Skip to content

A workaround solution for the render issue with MessageInputBar#99

Merged
nathantannar4 merged 3 commits into
v0.7.0from
bugFix/messageInputBarRender
Sep 4, 2017
Merged

A workaround solution for the render issue with MessageInputBar#99
nathantannar4 merged 3 commits into
v0.7.0from
bugFix/messageInputBarRender

Conversation

@nathantannar4

Copy link
Copy Markdown
Member

It seems as though when using a UINavigationController there is an issue with the rendering of an inputAccessoryView. This workaround creates a copy during the animation and then deletes it.

It seems as though when using a UINavigationController there is an issue with the rendering of an inputAccessoryView. This workaround creates a copy during the animation and then deletes it.
@codecov-io

codecov-io commented Sep 3, 2017

Copy link
Copy Markdown

Codecov Report

Merging #99 into v0.7.0 will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           v0.7.0    #99   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           3      3           
  Lines          77     77           
=====================================
  Hits           77     77

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b3aa820...50179c4. Read the comment docs.

required public init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
super.init(coder: aDecoder)
setup()

@SD10 SD10 Sep 3, 2017

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nathantannar4 Is this part of the workaround? There was a problem with unarchiving?

open var messageInputBar = MessageInputBar()

open var messageInputBar = MessageInputBar()
private var messageInputBarCopy: MessageInputBar?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a small comment above this explaning why we have it?

messageInputBarCopy = messageInputBar.createCopy()
guard let copy = messageInputBarCopy else { return }
view.addSubview(copy)
copy.addConstraints(nil, left: view.leftAnchor, bottom: view.bottomAnchor, right: view.rightAnchor, topConstant: 0, leftConstant: 0, bottomConstant: 0, rightConstant: 0, widthConstant: 0, heightConstant: 0)

@SD10 SD10 Sep 3, 2017

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind splitting this up onto multiple lines?

Comment thread Sources/MessagesViewController.swift Outdated
super.viewDidAppear(animated)
addKeyboardObservers()
messageInputBarCopy?.removeFromSuperview()
messageInputBarCopy = nil

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put these two things in its own private method removeMessageInputBarCopy()?

@SD10 SD10 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nathantannar4 If you could just take care of a few nitty things. Mainly I want to add that comment for why we are doing it. One line should suffice

@SD10

SD10 commented Sep 4, 2017

Copy link
Copy Markdown
Member

@nathantannar4 I'm taking care of these now 👍
Great work. Feel free to merge this in whenever 😃

@nathantannar4 nathantannar4 merged commit 26fbc7a into v0.7.0 Sep 4, 2017
@nathantannar4

Copy link
Copy Markdown
Member Author

Thanks @SD10, sorry I didn't have a chance to get to this yesterday

@nathantannar4 nathantannar4 deleted the bugFix/messageInputBarRender branch September 4, 2017 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants