开发者

Controls in Skype Chat Window , IPhone message app

开发者 https://www.devze.com 2022-12-14 22:51 出处:网络
I am creating a chat window similar to Skype Chat Window or the IPhone Message App chat windown What kind of UI controls are best for such purpose?

I am creating a chat window similar to Skype Chat Window or the IPhone Message App chat windown

What kind of UI controls are best for such purpose?

I am using TableViewController to manage this now. Each TableViewCell displays messages either received or sent. But I have problem of finding the right place to put a UITextField. I put it in the row after the row contains message, every time when a message sent or received, the UITextField moves one row down.The problem is that UITextField scrolls up or down just like the other messages.

Skype or the Message App fixed the UITextField at the bottom of the screen.How did they do that?

Thanks in advance to any one who can help I put some photos of my current UITextField a开发者_开发技巧nd one IPhone message which is how I want the TextField to be. http://www.flickr.com/photos/45412920@N03/?saved=1


Put the view containing the text field outside the table view. Your view hierarchy will look something like this:

  • UIView (main view)
    • UITableView (conversation)
    • UIView
      • UITextField (response field)
      • UIButton (send button)

UITableViewController expects the top level view to be a UITableView. You will have to subclass UIViewController instead and then either manage the table view directly or use an instance of your UITableViewController to manage the table view indirectly.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号