开发者

How to do a pop-up window with textfields in Objective-C?

In the iPhone Objective-C app, I want to pop-up a window (which is smaller than the main view, and the app does not stop running) when a button is tapped, with textField for the user to input text, and dismiss it when it is done. This is widely used but I really cannot google the relevant content out. What view should I use to connect it with the button? Alert开发者_Go百科View (which seems you cannot add dialogue in), ModalView? Are there relevant info somewhere? Thanks.


Make the popup it's own, full-sized window. Put a UIImageView in behind your popup screen, and duplicate the results of the normal window. That way, it will look like a popup window, but it still has the proper animation speed and everything. If you do it as a real popup, the game itself will slow down and look jumpy.


You can create any view and use UIViewController's presentModalViewController: to display a modal view controller (and even animate it).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜