interface-builder

iOS: Best way to make a UIScrollView with dynamic height?

回眸只為那壹抹淺笑 提交于 2019-12-20 04:36:06
问题 I'm currently setting up a UIScrollView with the following structure UIScrollView --ContentView (UIView) --ContainerView1 (UIView) --UILabel1 --UILabel2 --ContainerView2 (UIView) --UILabel3 --UILabel4 --ContainerView3 (UIView) --UILabel5 --UILabel6 I've pinned all the four edges for all the elements above and also have defined their height constraints (Storyboard complaints of zero height if I didn't do so). Now whenever my UILabel receives its text from the server, I call sizeToFit for all

Static Table Cells in NIB File

主宰稳场 提交于 2019-12-20 03:43:07
问题 Is it possible to create a nib file that has a table view with custom static cells? I want to create a form-like table view with all static content, but I'm not currently using storyboards. I was able to find the content type menu in the default Storyboard of my app, but I'm using Nibs, and when I create either a UIViewController nib or a UITableViewController nib, in both cases there is no content type menu in the Attributes inspector tab. Any thoughts? 回答1: It seems like at the moment, what

How to add uisearch bar to a tableview using interface builder?

僤鯓⒐⒋嵵緔 提交于 2019-12-20 03:31:32
问题 How do we add uisearch bar to a table view using interface builder ? 回答1: Well you can't do that using interface builder. You need to implement the DataSource and Delegater of the UITableView to initialize and add contents to the table and while you are doing that you can add the UISearchBar in a particular cell. But that is a bad design as such the user wont be able to use search option as he scrolls down. so instead take my advice add UISearchBar on top of UITableView using IB. Its easy to

Incompatible Object Model Version

老子叫甜甜 提交于 2019-12-20 00:59:21
问题 Can anyone explain what's going on here? I have a file I JUST saved from a new version of my application - yet if i close my application and double click that document file, it gives me this error: The document “main” could not be opened. The managed object model version used to open the persistent store is incompatible with the one that was used to create the persistent store. Now, I have checked Google for this and it appears to be fairly common, however, I tried the advise of deleting the

Using float values in storyboard

删除回忆录丶 提交于 2019-12-19 10:29:10
问题 I want to to assign a float value to a UIButtons frame in Storyboard. But I can only use int values. Is it discouraged to use .5 for example? because I have some buttons and I want to place them according to the original photoshop design. for example I have a button I need to be placed at X:151 , how can I achieve that? 回答1: Do NOT use a float value. As you have rightly observed, Interface Builder prevents this; but you should not do it even in code. Just the opposite: when you assign a frame

InterfaceBuilder - UIViewController subclass not recognized as subclass

给你一囗甜甜゛ 提交于 2019-12-19 10:21:01
问题 I'm working on a simple iPhone app. I have 1 UINavigationController and 2 subclasses of UIViewController. I have a MainWindow.xib file, a PersonListView.xib, and a PersonDetailView.xib. The MainWindow.xib has the UINavigationController with the view linked over to the PersonListView.xib file. The PersonListView.xib has the File's Owner listed as a PersonListViewController class. I have some buttons on the PersonListView, along with labels and images. All displays correctly. When I try to link

Core-Plot: Unknown class CPLayerHostingView in Interface Builder file

馋奶兔 提交于 2019-12-19 10:11:30
问题 Using core-plot does not seem to be an easy integration task. Header path are already setup. In Interface-Builder I create an CPLayerHostingView which belongs to a View Controller which is instantiated by Interface Builder. When the nib file is loaded I get the message: Unknown class CPLayerHostingView in Interface Builder file 回答1: I found, that there are two different versions of that object. One for Mac-Only called "CPLayerHostingView", one for iPhone only called "CPGraphHostingView". If

iOS 8 - Swift - Xcode 6 Beta - working without interface builder (no nibs and no storyboard)

℡╲_俬逩灬. 提交于 2019-12-19 09:50:39
问题 I have been searching a lot in the inter webs and Stackoverflow. Unfortunately there doesn't seem to be much info around the new Xcode version, iOS 8 specifically with Swift and working without the Interface Builder. The Templates to choose from as a starting point now does not have the option to start with an empty application. The least setup you have is to take the single view application, which already gives you the ViewController and a basic Storyboard. I hate storyboards and I hate nibs

iPhone Interface Builder - Moved resources to sub-directory, now IB can't see them!

假如想象 提交于 2019-12-19 09:22:00
问题 I had a bunch of images in my Xcode project. They were originally added without choosing "Create Folder References for any added folders". So I removed the references and re-added as per these instructions Include a resource directory hierarchy into app bundle Unfortunately, Interface Builder will not display any of the images inside that directory. On the project tree the directory comes up with a blue icon and all the files are there! The file names show in the IB Inspector (i.e. under the

Regular / Regular position sizing constraints for all iPads, including iPad pro?

怎甘沉沦 提交于 2019-12-19 07:49:57
问题 I've used multipliers in my constraints, to size my views. However in my constraints for position I've used values, which I change for different sizing classes. However using regular / regular sizing classes for iPad Pro it's positions values aren't big enough, but for other iPads it's fine. I seriously don't have to add positioning views with multipliers to provide percentage spaces for all my views as well do I? 回答1: What we're after is to set the margin between the top of the screen and