interface-builder

In Interface Builder, how I do to resize correctly this image to make it device specific?

不羁岁月 提交于 2019-12-24 10:55:53
问题 I am using the Auto Layout feature, and I would like to know if I can use different image sizes for different screen sizes. Here's what my Storyboard File looks like. As you can see, there is an image of a guy . How do I keep the size of image proportional for every screen size? Let me explain. On an iPhone 4" the guy image should look a little bit smaller than on an iPhone 5.5". Is this even possible? On an iPhone 3.5" the image should look small . On an iPhone 4" the same image should look

What is “Interface Builder Cocoa Touch Tool”

回眸只為那壹抹淺笑 提交于 2019-12-24 10:35:42
问题 I got a code from a client to fix the bug (code was written by some other programmer), So when I open the xib file it simply hang my computer, i restarted my computer 3 times because of that and finally decided to see what's happening by opening the Activity Monitor and it turn out it is opening something with name " Interface Builder Cocoa Touch tool " and its eating all of my computer memory. Below is the screenshot. But here is the interesting thing, it is not opening " Interface Builder

Is it possible to group items in a NSPopupButton?

放肆的年华 提交于 2019-12-24 10:17:21
问题 I'm trying to display a list of system voices, but I'd like to group them by region. This is an example of select in html. Ideally I'd like to create a dropdown that is similar to accessibility language selection. Is there any way to replicate this in Interface Builder / swift? Any pointers would be appreciated. Update: The reason for this, is because I am displaying a list of speech voices to the user. At the moment, it mixes all the regions together, which is very confusing. There is an

How did I get this with Interface Builder (and is it 'legal')

旧城冷巷雨未停 提交于 2019-12-24 10:05:03
问题 So here's a weird one. I've been doing a combination of interface builder and some direct editing of the .xib file and somewhere along the line I managed to produce a button (UIBarButtonItem) on the Toolbar that actually has a label BENEATH the button. Which I quite like, if only I knew how to get it consistently. Is this a standard thing that can be done with Interface Builder via some obscure methodology? Or is there a well-defined way to do it just by editing the .xib file? Note too that

Top space on device rotation

荒凉一梦 提交于 2019-12-24 07:59:37
问题 I have the following constraints on my UIView in portrait mode: And landscape: This is screenshot of the ViewController when I open it first time: Top space is OK. Then I'm rotating the device to landscape: Do you see that white space on the top? And when I'm rotating it back to landscape, the space still stays: Why and how to fix it? 回答1: Try to uncheck Adjust scrollview insets Of viewcontroller attribute Source Of Image: Here 回答2: You might have set TopConstraint of your view With margin.

Xcode 4 interface-builder problems

旧时模样 提交于 2019-12-24 07:28:37
问题 I have several problems with the interface builder in Xcode 4. I am using Xcode 4.5 but the problems started even before I updated it. My first problem is that if I edit a field (e.g. a text field from not editable to editable) it sometimes disappears. Or other fields change their position. My second problem which is probably related to the first one is that the size inspector looks strange and when I switch do a different inspector the size inspector I'm used to appears for half a second

Obtaining the UITableViewHeaderFooterView of a static UITableView

和自甴很熟 提交于 2019-12-24 02:09:29
问题 I have a Storyboard which contains a UITableViewController . The table view is static and contains two sections. The table view was setup entirely in IB (including the header and footer text of the table view sections) - I have not implemented any table view delegate methods in my view controller. If I attempt to get a reference to the UITableViewHeaderFooterView for a given section it always returns nil. UITableViewHeaderFooterView* header =[self.tableView headerViewForSection:0]; When I run

Proportional layout for iPhones (from 5 to 6 Plus) with Size Classes

血红的双手。 提交于 2019-12-24 01:02:06
问题 I have passed through a number of tutorials about Size Classes but still I cannot figure out one thing. iPhone 5, iPhone 6 and iPhone 6 Plus have absolutely the same screen aspect ratios, so I want them to use the same content layout. By saying the same I mean proportional to width and height of the screen. But! I cannot find a way to make it proportional for all iPhones! There are just a few constraints that truly support proportions: "Aspect Ratio", "Same Width" + "Multiplier", "Same Height

In Swift (tvOS) how do you change a UIButton's highlight and focus colors?

我只是一个虾纸丫 提交于 2019-12-24 00:18:40
问题 So I have some buttons that I've added to a view through the Interface Builder and rather than using the system buttons I made them custom. I'm trying to figure out how to change characteristics, such as the text color and background color during different states (highlighted, focused, etc). It doesn't seem like I can do it through the IB so I'll probably make a subclass of UIButton and change them there, but I'm having trouble finding what properties to change. I don't see them explicitly

Are Images assigned in a xib cached?

让人想犯罪 __ 提交于 2019-12-23 23:31:14
问题 If I assign an image to a UIImage view in a xib, is that image cached so that if I access the image using UIImage imageNamed: I am getting cached Image data? I'm using iOS 5.1 回答1: UIImage imageNamed: does its own cacheing of any images you use. The first time you use it for a given image, it'll populate the cache, and subsequently it'll use the cached version. UIImageView in Interface Builder takes a string to tell it what image to use. It appears that the object that is actually encoded in