interface-builder

Xcode 4 - Is there something in Interface Builder like “reveal in canvas”?

浪子不回头ぞ 提交于 2019-12-23 21:13:22
问题 I have a fairly complex xib with many elements. Some of them are on top of each other. If I want to move an element for example by using the arrow-keys I need to select it in the canvas, but if that element is "under" another, I can't click on it. So I'm looking for the "opposite" of "Reveal in Document Outline". In Xcode 3 there was a shortcut for that, sadly I forgot it and can't find it anywhere. Maybe that still works in Xcode 4... Does anyone know that shortcut? Or even a better way to

Why doesn't IB see my IBAction?

∥☆過路亽.° 提交于 2019-12-23 18:47:14
问题 I've been staring at this for way too long. There's nothing fancy happening here, and I've done this dozens of times, yet Interface Builder steadfastly refuses to provide me an action target for -(IBAction)slideDirections . I'm at the point where I'm willing to post publicly and feel stupid. So let 'er rip. Here's my .h: #import <UIKit/UIKit.h> #import <MapKit/MapKit.h> @interface PulseDetailController : UIViewController { NSDictionary *pulse; IBOutlet MKMapView *map; IBOutlet UIWebView

Create a UIButton with (or without) memory

淺唱寂寞╮ 提交于 2019-12-23 18:45:34
问题 I'm trying to add a UIButton with code (not Interface Builder). Some examples say you MUST alloc and release memory for the button. Others use buttonWithType and magically create a button without alloc'ing any memory at all. How is that possible? (Both seem to work fine.) Which of the 2 methods do I want to use... and when? Are there some huge benefits to 1 method or another? PLEASE don't tell me to just go "read the docs". The docs are the REASON I am here. They rarely seem to explain things

Cannot select Custom Class for Table View Controller (UITableViewController)

眉间皱痕 提交于 2019-12-23 17:33:40
问题 Let me preface this by saying that I've already tried quitting and restarting Xcode, as well as deleting derived data for the project, to no avail. I'm at wits end right now. Basically, I've created a custom ViewController class I want to use, but I cannot select it. In fact, using the Custom Class dropdown, I can only select the default UITableViewController class for my controller. The weird part is, it looks like the full list appears for a split second sometimes, before being replaced by

How to make multi-line UILabel text fit within predefined width without wrapping mid-word

≯℡__Kan透↙ 提交于 2019-12-23 17:21:26
问题 I have a UILabel carefully laid out in Interface Builder with proper height and width constraints. The number of lines is set to 4. The wrapping is set to word wrap. The text is "CHECKED". The font size is very large and thus it only fits "CHECKE" and the "D" is on the second line. Writing "Checked" instead of "CHECKED" lets the font shrink (as intended) so that the whole word fits. But (the text is user given and it can be expected that the user writes fully uppercase words) having uppercase

How to define Outlets and Actions in the Classes Pane in Interface Builder in Xcode 4?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 12:39:00
问题 In Xcode 3 one used to be able to define Outlets, Actions etc in Interface Builder by going to the Library > Classes Pane and selecting the class from the list. Is this functionality missing in Xcode 4 ? There is a File Template Library in the Utility area (Lower Right Corner) in Xcode 4 but my custom clases do not show here !! 回答1: This does appear to be removed from Xcode 4, but there isn't much need for it anymore since Xcode 4 integrates the editor directly with IB. The feature never

Xcode IBDesignablesAgentCocoaTouch loads CPU infinitely?

爱⌒轻易说出口 提交于 2019-12-23 12:14:44
问题 I have a .xib file with extensive usage of IBDesignable views. As view grown I noticed constant CPU load. Now, my view is really big and when I open it in interface builder, ActivityMonitor show this: . It continues even if I leave .xib file and go to code. The only solution to stop it is to close, then open Xcode and don't open .xib file until it is really necessary. My rough assumption is that Xcode continues compiling my project/views in background to maintain IBDesignable views in actual

Rounded Textured Segmented control style deprecated in OSX 10.7? What should I use?

岁酱吖の 提交于 2019-12-23 10:13:10
问题 I'm getting this warning message when I try using "Segmented control" with style "Rounded Textured". It is the default style in Interface Builder, so I wonder why is it complaining? If I set to any other style, the warning goes away. But I want to use this style, so that it matches other controls in the task bar. OSX10.7 / XCode 4.1 回答1: What about "automatic"? That's what's always looking good for me. 回答2: I've just hit this issue and the suggested fix of using "Automatic" doesn't work for

iPhone app without using Interface Builder

十年热恋 提交于 2019-12-23 09:32:21
问题 Is there any reason to not write iphone apps without useing the interface builder? (or in other words, is it ok to write apps without the builder?) 回答1: Personally, my applications use no NIBs within them, but that's more of a matter of how I started doing development than anything else. I transitioned over from doing Mac development (where I use Interface Builder almost every day) to iPhone from when the first beta SDKs were released. Initially, there was no Interface Builder, and even when

Can't Wire to Subview in IB

我是研究僧i 提交于 2019-12-23 09:04:55
问题 Quick question. Using IB, I have a subview in a ViewController. In that subview I have a label, which I would like to wire to my custom subview class. However, IB will not let me. What am I missing? I also tried to add the label programmatically; however, it appears that the frame was not ever set. I could hard code the size of the label, but I could not make it dependent on the frame size of my subview, because the frame and the bounds were always zero rects, even after the view showed up in