interface-builder

Zooming into Interface Builder

徘徊边缘 提交于 2019-12-13 06:10:12
问题 Hi just a quick question, I have a 30" monitor, and when the IB section of Xcode is open the iPhone screen rectangle looks pretty small, and theres loads of wasted space around it. Is there a way of akin this bigger on the screen without actually making the dimensions bigger? 回答1: No, it doesn't look like it: The interface builder storyboard canvas is limited to 100% as maximum zoom. 回答2: To zoom within Interface Builder, be sure to have the storyboard selected then use the following keyboard

iPhone 4 & 5 Autoresize Vertical Space

末鹿安然 提交于 2019-12-13 06:02:09
问题 I built my views in Interface Builder for iPhone 4 dimensions. I thought that the Autoresize Constraints in iOS 6 will take care of the resizing automatically. The screenshot shows the Top Space constraint that Xcode added automatically. It says that the relationship between the top and the bottom orange view must be 332 points. When viewed in iPhone 5, the orange button is stretched all the way to the bottom as you can see in the screenshot below. When changing the relation to Greater Than

Is it ok to send normal messages via Interface Builder's binding’s model key path?

穿精又带淫゛_ 提交于 2019-12-13 05:16:40
问题 Is it ok to send normal messages via Interface Builder's binding’s model key path ? I want to enable some menu items only if the main window of my application is visible. I simply tried the following to see what would happen: In the bindings inspector of the menu item i bind Availability-Enabled to the AppDelegate and set the model key path to self.window.isVisible . This seems to work well, but is it meant to be used like this? Legal in the AppStore? A little exclamation mark appears next to

Interface Builder, frame changes on IOS 6

佐手、 提交于 2019-12-13 04:36:25
问题 I have a xib file that support IOS 6 and 7. The problem is when i selected view as IOS 6 the frame from IOS 7 change, and vice versa. Here is a screenshot, previewing the IOS 6.1. I adjust the frame to (0, -3, 255, 85) and when adjust the frame using view as IOS 7 the frame becomes: (-345,894,0,0). When i adjust the frame using view as IOS 6.1 and early the frame changes for IOS 7. I just want to use the same frame in both IOS version. Some informations that may be relevant: Was an existing

Content of scrollview changes size when scrolling

六眼飞鱼酱① 提交于 2019-12-13 04:35:57
问题 I'm using iOS 6 and Xcode 4.6 and with the Interface Builder I added to my controller a UIScrollView that uses all the available space. In this UIScrollView I added some views (a UIImageView , a UITextView and a UITableView (I disabled the scrolling for the UITextView and the UITableView )). In the : - (void) viewDidLayoutSubviews; method I resized all my views by increasing their height (to fit with their respective content). Then, I set the contentSize of my UIScrollView so that it fits

My app requires using instantiateViewControllerWithIdentifier - why?

谁都会走 提交于 2019-12-13 03:41:06
问题 I have added a Storyboard file to an app that initially had none. For some reason, I could not get my custom UIViewController to display correctly until I added this into didFinishLaunchingWithOptions : ActivityViewController *viewController = [[UIStoryboard storyboardWithName:@"MainStoryboard" bundle:NULL] instantiateViewControllerWithIdentifier:@"ActivityViewController"]; Why do I need to force the use of my storyboard like this? The iOS template projects (Single View, Master-Detail etc)

How do I use an NSFormatter subclass with an NSPopUpButton

痞子三分冷 提交于 2019-12-13 03:06:39
问题 I want to use an NSFormatter subclass to format the contents of an NSPopUpButton I'm using to display a list of choices. Basically I have an NSArray of MyObjects which is bound to the NSPopUpButton via the Content Values binding and I want to display something in the pop up menu other than what is returned by -description. I don't really want to use a transformer because then I have to create an entirely new array and transform each object into a string before adding it to the new array.

iPhone locked Portrait, iPad locked Landscape

自作多情 提交于 2019-12-13 02:52:13
问题 I'm trying to convert an iPhone app to iPad. The tricky things is that the iPhone app has to be locked to portrait view and the iPad app has to be locked to landscape view. I'm kind-of a noob at interface builder so I'm a little lost. Any help is greatly appreciated. Thanks! 回答1: You need to override shouldAutorotateToInterfaceOrientation . A good place to put this is in the app delegate. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if (UI_USER

UI Elements placed in IB appears shifted up in Simulator

两盒软妹~` 提交于 2019-12-13 02:37:45
问题 I dont know if I am missing something here but when I drop elements (UIImage or UILabel) in IB and run the app in simulator, the UI elements are shifting up a little (Snapping to status bar if I place them at first blue HIG line). Looks like some setting I am overlooking. Does this sound familiar? please help! Added Screenshot to explain whats going on ... In Interface Builder alt text http://dl.dropbox.com/u/3093402/Images/IB.png In Simulator alt text http://dl.dropbox.com/u/3093402/Images

How can get a reference to an NSWindow created in a xib file?

霸气de小男生 提交于 2019-12-13 01:29:09
问题 I use a xib file to show an NSWindow named mainWindow - now I want to get a reference to mainWindow via code (e.g. NSWindow *mainWindow ). I can't find anything in the documentation, any pointers? 回答1: The xib file will have placeholder objects in it for the app delegate and / or the file's owner. On the assumption that it has the app delegate in it, you can get a reference to the window or any object in the xib by Declare a property in the app delegate of the right type and with IBOutlet as