interface-builder

iOS7 hide status bar but not adjust top layout guide

和自甴很熟 提交于 2020-01-21 06:29:30
问题 I deal with autolayout set up in Interface Builder. I want to not offset views that are pinned to top layout guide when I hide status bar in runtime. I have discovered that myViewController.topLayoutGuide.length changes from 20 to 0 when hiding status bar. How to prevent it? Or (as workaround) how to set up fullscreen view for various window sizes without pin to top layout guide? Some code to describe my situation: Log(@"frame: %@, top: %.0f", NSStringFromCGRect(myViewController.myView.frame)

iOS7 hide status bar but not adjust top layout guide

我与影子孤独终老i 提交于 2020-01-21 06:29:25
问题 I deal with autolayout set up in Interface Builder. I want to not offset views that are pinned to top layout guide when I hide status bar in runtime. I have discovered that myViewController.topLayoutGuide.length changes from 20 to 0 when hiding status bar. How to prevent it? Or (as workaround) how to set up fullscreen view for various window sizes without pin to top layout guide? Some code to describe my situation: Log(@"frame: %@, top: %.0f", NSStringFromCGRect(myViewController.myView.frame)

Xcode 4 and Interface Builder: Editing Vertical Spacing Constraint (Anchor Top, not Bottom)

谁都会走 提交于 2020-01-21 04:31:20
问题 I've got a widget that is not laying out correctly on device (its looks OK in IB, but its not quite right). The widget is a label and its located about mid-screen. Interface Builder gave it a Vertical Space Constraint with a 'Bottom Anchor'. Here, bottom means bottom of the screen (rather than a widget below, or anchor to top screen). I'm in the inspector, but I don't see how to change to a top anchor (preferably, to the widget above). I tried reading Apple's docs and Editing Constraints in

Does Interface Builder use the -init method to initialize view controllers?

左心房为你撑大大i 提交于 2020-01-19 20:29:39
问题 I have setup tab bar controller using interface builder, and each tab bar item is linked to a view controller (4 tabs, 4 view controllers). I want to know if Interface Builder uses an -init method to initialize the view controller because apparently this method does not get called: - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil; ... and I want to do some initializations. I can't add that to -viewDidLoad since it is recalled in case of memory warning. Any idea

Does Interface Builder use the -init method to initialize view controllers?

 ̄綄美尐妖づ 提交于 2020-01-19 20:28:07
问题 I have setup tab bar controller using interface builder, and each tab bar item is linked to a view controller (4 tabs, 4 view controllers). I want to know if Interface Builder uses an -init method to initialize the view controller because apparently this method does not get called: - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil; ... and I want to do some initializations. I can't add that to -viewDidLoad since it is recalled in case of memory warning. Any idea

How do I set up a proxy object in the main application NIB?

非 Y 不嫁゛ 提交于 2020-01-17 03:27:05
问题 I would like to set up a proxy object in the application NIB file. The problem is that the NIB file is the main application NIB that gets loaded automatically by the application and therefore I cannot set up the UINibProxiedObjectsKey dictionary as described in the documentation. Is there a way to set up a proxy object in the main application NIB? Or can I tap into the code that loads the main application NIB? 回答1: My main problem was that I was trying to use Interface Builder as a dependency

Is there no way to use IB and the relationship of two entities to populate an OutlineView?

。_饼干妹妹 提交于 2020-01-16 18:30:13
问题 I have touched on this question in others before but after writing an answer to a previous question there got me wondering why this isn't possible - or am I missing the fact that it might be? Given that Interface Builder is very good at graphically linking various methods and delegates and data sources, is it possible that there's no straightforward graphical means to populate an OutlineView using two entities made in a Core Data model that have a parent child relationship set up so that (I

Is there no way to use IB and the relationship of two entities to populate an OutlineView?

坚强是说给别人听的谎言 提交于 2020-01-16 18:30:10
问题 I have touched on this question in others before but after writing an answer to a previous question there got me wondering why this isn't possible - or am I missing the fact that it might be? Given that Interface Builder is very good at graphically linking various methods and delegates and data sources, is it possible that there's no straightforward graphical means to populate an OutlineView using two entities made in a Core Data model that have a parent child relationship set up so that (I

AutoLayout with size classes: Different spacing depending on iPhone screen size

元气小坏坏 提交于 2020-01-15 18:00:52
问题 I have a UIViewController set up in an UIStoryboard in Interface Builder using size classes. This looks good on an iPhone 5 with the 4" screen, but on the 5.5" screen of the iPhone 6 Plus the elements are too cramped in the top area of the device. I want to increase the constant of the spacing constraints on iPhone 6 and 6 Plus. As far as I was able to see that's not possible with size classes, as there is only one size class for all iPhone displays (no matter if 3.5" or 5.5"). What is the

AutoLayout with size classes: Different spacing depending on iPhone screen size

允我心安 提交于 2020-01-15 17:58:31
问题 I have a UIViewController set up in an UIStoryboard in Interface Builder using size classes. This looks good on an iPhone 5 with the 4" screen, but on the 5.5" screen of the iPhone 6 Plus the elements are too cramped in the top area of the device. I want to increase the constant of the spacing constraints on iPhone 6 and 6 Plus. As far as I was able to see that's not possible with size classes, as there is only one size class for all iPhone displays (no matter if 3.5" or 5.5"). What is the