interface-builder

UITextField “value changed” not firing when field is updated

杀马特。学长 韩版系。学妹 提交于 2019-12-31 10:57:27
问题 I have an IBAction that I have connected to a UITextField element in Interface Builder. (Firing on "value changed" event) I also have a UISlider that updates the TextField element automatically when it's value gets adjusted. When I run my app, the TextField does get updated when I adjust the slider, but the "value changed" event does not fire when this happens. The value changed event also does not fire when I edit the TextField by hand as well. (Although using the Did Editing End trigger

How to disable Xcode 5 automatically upgrade xibs to iOS7 appearance

为君一笑 提交于 2019-12-31 10:43:19
问题 If you open an Xcode 4.x project at Xcode 5 and then open a xib at Interface Builder, you will get an alert: NOTE: I only have the issues with the forced iOS7 appearance, auto layout is still turned off for me. And then i accidentally clicked "Alway Upgrade" so Xcode automatically upgrades all my xibs to Xcode 5 and iOS7 prior. But i use Xcode 4.x parallel and it's very annoying to switching back all the xibs when i accidentally open them in Xcode 5. Before opened in XCode 5 interface builder

How to use different interface declarations at compile time without confusing Interface Builder

十年热恋 提交于 2019-12-31 03:22:06
问题 If I have multiple builds of my app, paid and free versions, for example, and I want to have different interfaces depending on which build, it seems to confuse Interface Builder. For example: // MyViewController.h #ifdef FREE @interface MyViewController : NSObject <UIActionSheetDelegate, ADBannerViewDelegate> #else @interface MyViewController : NSObject <UIActionSheetDelegate> #endif { IBOutlet UILabel* myLabel; } - (IBAction) myAction:(id)sender; When I load up MyViewController.xib in IB, it

Custom Tableview cell with multiline UILabel needs dynamic height

时光怂恿深爱的人放手 提交于 2019-12-31 02:50:09
问题 I created a custom TableView cell with Interface Builder. This is what it looks like: For the Description Label, I need that to word wrap so I set it as such: In my SettingsPageViewController, I have the following Table View methods overridden: @implementation SBSettingsViewController { NSArray *settingHeaders; NSArray *settingDescriptions; } - (void)viewDidLoad { [super viewDidLoad]; [self setupLeftMenuButton]; // Do any additional setup after loading the view from its nib. settingHeaders =

Resize NavigationController in InterfaceBuilder

坚强是说给别人听的谎言 提交于 2019-12-31 01:50:27
问题 This could be a daft question, but is there a way to resize the Navigation Controller in a storyboard? It simply takes up too much screen space. Most of my views are pop-overs at the right size but then have a huge iPad size Navigation Controller next to them. This is purely for visual work in Interface Builder as I have about 20 different screens and it's getting a bit crowded. 来源: https://stackoverflow.com/questions/10988168/resize-navigationcontroller-in-interfacebuilder

Why is self.view.subviews an empty array in viewDidLoad?

試著忘記壹切 提交于 2019-12-30 18:33:13
问题 I've created a bunch of UI elements using Interface Builder and hooked them up to my ViewController using IBOutlets. However, when I try to iterate through self.view.subviews in my ViewController's viewDidLoad method, I find that the subviews array is empty. ViewController.xib : UIView | - UILabel - UIButton - // ... more stuff - UIToolbar ViewController.m : #import "ViewController.h" @interface ViewController () // Interface elements @property IBOutlet UILabel *titleLabel; @property IBOutlet

How to load a storyboard from a XIB file?

本秂侑毒 提交于 2019-12-30 05:35:50
问题 I am trying to load a storyboard file from a XIB file when a button is clicked. So in the IBAction method I have called the following line: - (IBAction)NextView:(id)sender { UIStoryboard *mainStoryBoard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]; [mainStoryBoard instantiateViewControllerWithIdentifier:@"StoryViewController"]; } But I get this error when I run the application Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Storyboard (

Enabling NSScrollView to scroll its contents using Auto Layout in Interface Builder

旧巷老猫 提交于 2019-12-30 04:40:08
问题 I have implemented a custom NSView which contains many NSTextField s and other NSView s. I then embedded that custom view in a scroll view using Editor > Embed In > Scroll View. This creates the appropriate hierarchy as visible in the Outline, but I needed to then add Auto Layout constraints to specify where this scroll view should be placed within the view (top, bottom, leading, trailing). Additionally I had to add constraints for the custom view, set against the clip view, in order to lay

Hide cells in a UITableView with static cells - and no autolayout crash

旧时模样 提交于 2019-12-30 03:47:06
问题 I have a table view form created using Static Cells in IB/Storyboard. However, I need to hide some of the cells at runtime depending on certain conditions. I have found a few 'answers; to this question on SO, e.g. UITableView set to static cells. Is it possible to hide some of the cells programmatically? .. and they focus on setting the height of the cell / row to 0. This is great, except I now get exceptions from AutoLayout because the constraints can't be satisfied. How do I get around this

Using Interface Builder for UITableViews

落花浮王杯 提交于 2019-12-30 00:44:08
问题 I'm very early in the iPhone development learning process. I'm trying to get my head around various pieces. Right now I've just taken the basic NavigationController template and I'm trying to create a simple grouped table view with a couple of text fields. What I can't seem to do is to get Interface Builder to allow me to drop a UITableViewCell into a UITableView so that I can then add a text field to the Cell. Is this even possible (it would seem that its supposed to be given the fact that