uiviewcontroller

This class is not key value coding-compliant for the key Picker

瘦欲@ 提交于 2019-12-25 19:07:12
问题 I added a view to my app that I open from a button and can't find what I'm doing wrong. I triple checked that dataSource & delegate are connected to File's Owner *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<HelpViewController 0xab58980> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key Picker.' The code in my viewcontroller.h @interface LanguageSelectionViewController : UIViewController { IBOutlet UILabel *label; IBOutlet

Embedding a UITableView as a container view within a UIViewController

*爱你&永不变心* 提交于 2019-12-25 18:36:42
问题 I would like to add a textfield and send button that sticks to the bottom of uitableview similar to a chat app. I have come across comments on embedding a UITableView as a container view within a UIViewController. However, they seem to lack an example on how to achieve this. More specifically details including where to add a textfield/button and move textfield up when keyboard appears, etc. Thanks! 回答1: follow the steps using the storyboard 1) drag a uiviewcontroller from the object library.

How to load different view controller class from app delegate at the time of application launch(i.e from app delegate)

跟風遠走 提交于 2019-12-25 18:16:29
问题 I was developing a screen where i want to load view controllers based on the condition.i.e with respect to condition it should load a particular view controller class from app delegate at the time of application launch. if(condition success) { //Load viewcontroller1 } else { //Load viewcontroller2 } How can i achieve this .Please help me out.. 回答1: Just open Xcode, create a new project, make it Universal (iPad/iPhone) and you'll see an example of this. It creates for you two .xib files. One

Can I have more than 1 UITabBarController?

喜你入骨 提交于 2019-12-25 16:39:37
问题 Lets imagine the scenario: UITabBarController - UITabBar - Tab 1: View Controller A - Tab 2: View Controller B When I click on View Controller A I want to push another UITabBarController: UITabBarController -UITabBar - Tab 1: View Controller 1 - Tab 2: View Controller 2 - Tab 3: View Controller 3 Is this possible? To have a UITabBarController push another UITabBarController onto the view stack? 回答1: You can certainly do this but I would rethink your design. Selecting a UITabBar item and

Can't get UIScrollView to work

不想你离开。 提交于 2019-12-25 12:27:20
问题 This is a storyboard app. I added a UIScrollView on top of the UIView that is there in the view controller by default. Then I added some UI elements on to the scroll view. After designing the viewable part of the Scroll view, using its handles I stretched it vertically and pushed it up a bit so that that part is visible for me to design the rest of the screen. After I was done I positioned the scroll view back to fit the view. Please note that I did not resize the scroll view to match the

Multiple UIView types in one UIViewController

北战南征 提交于 2019-12-25 12:00:27
问题 I'd like to load a plain UIView, a UIWebView and a UITableView all in the same nib. Is that possible in the same UIViewController? Is it possible to assign multiple UIViewControllers to the same Window? 回答1: Something close is possible. I recently answered your question about multiple views in one window; the approach for having multiple view controllers is very similar, although they do need separate nib or xib files. The way to do it is as follows: Instantiate all the various controllers

How to design code architecture when overlapping objects exist?

依然范特西╮ 提交于 2019-12-25 11:47:12
问题 I have 1 main Master screen (MVC) and 4 other screens that share ~80% of graphic objects. They differ in some label texts, a button with action and some other 20% graphics. Thinking in terms of clean object oriented code architecture, I have started to implement those screens as separate UIViewControllers. But I didn't like having pointers to those 4 MVCs and a duplication of some methods, so I rewrited the code into one UIViewController. Most of graphic objects are UIImageViews that I put on

Error when moving view Controller

不羁岁月 提交于 2019-12-25 11:25:37
问题 I get an error saying *** Assertion failure in -[HatsViewController loadView], /SourceCache/UIKit/UIKit-2380.17/UICollectionViewController.m:104 *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UICollectionViewController loadView] loaded the "FCD-ki-UFO-view-1vb-8P-s3C" nib but didn't get a UICollectionView.' *** First throw call stack: (0x3467c2a3 0x3c36097f 0x3467c15d 0x34f51ab7 0x368aaa95 0x364a346d 0x3652f353 0x36570d11 0x3656ffe7 0x366923ef

tabbarcontroller as a subview

拈花ヽ惹草 提交于 2019-12-25 11:15:27
问题 I have a main view screen with navcontroller in my app with two UIbuttons. Now i want that when I press one button a subview will be pushed. this I know how to do. The problem is that I want this subview to be with tabbarcontroller. I know how to implement tabbar on the main views (within the app delegate), but I have really hard time to do this as a subview.. How should I implement this? Thanks. 回答1: Don't. It's been dealt with many times here before that there is no supported way to have a

Greystripe sdk full screen ads removing modal view controller

若如初见. 提交于 2019-12-25 08:57:04
问题 My question is pretty much the same as this one but without a solution. I have a modal view that calls to display a Greystripe full screen advert. When I dismiss the advert, it appears to take my modal view away with it as I see my main menu, however the main menu doesn't function properly and I suspect the modal view is still there, maybe moved to the back if this is even possible? I've tried using a non modal view which works fine when dismissing the advert immediately, but if clicking the