storyboard

Prototype cell from storyboard not creating UILabels, etc

孤者浪人 提交于 2019-12-21 11:28:51
问题 My question is very similar to this one. My custom prototype cells designed in Interface Builder using storyboards have all the internal objects set to nil (not created), so when I try to assign values to them, they remain blank. I am using Xcode 4.6.2, and running the code in the 6.1 iPhone simulator. Here is what I've done: designed a prototype cell in interface builder with the necessary fields. created a subclass of UITableViewCell for this custom cell in code, and then set the cell in

Add a storyboard view as a subview of a programmatically created view

元气小坏坏 提交于 2019-12-21 11:12:05
问题 I have created a special class of UIView that has certain properties, and I did so programmatically because it is usually blank but will at times contain other views. I know that if I create a UIView programmatically I can do something like [specialView addSubview: aView]; My problem is that there is a UIView that I created in storyboard and I need to add that UIView as a subview on my special view. I have connected it as a property in my ViewController but when I do the same code as above,

IBOutlet's are nil when using custom tableviewcells in a storyboard

允我心安 提交于 2019-12-21 09:35:32
问题 The storyboard has a tableview with one prototype cell, the UITableView has a prototype cell and it has been configured to be the custom UITableViewCell sublclass. The prototype cell is hooked up to the custom sublcass correctly, the IBOutlets are configured correctly, but for some reason when I get the cell it ends up all my custom subviews are nil. I've also configured it so that the customIdentifiers are the same. 回答1: So the problem that I was facing was a weird oversight, when you

iOS Integrate PKRevealController with Storyboard & Auto Layout

时间秒杀一切 提交于 2019-12-21 09:27:17
问题 I'm trying to integrate PKRevealController into an existing project of mine. https://github.com/pkluz/PKRevealController How do I set up my left view controller, right view controller, and front view controller if I'm using storyboard? The readme says to do... PKRevealController *revealController = [PKRevealController revealControllerWithFrontViewController:frontVC leftViewController:leftVC options:options]; self.window.rootViewController = revealController; Where would I put these lines of

How to migrate from iPhone/iPad storyboards to universal storyboard

一曲冷凌霜 提交于 2019-12-21 09:17:08
问题 I have a project created in Xcode 5. The "Deployment Info" settings says Devices: Universal but has separate iPhone and iPad settings and corresponding iPhone and iPad storyboards. Now I'm developing the same project in Xcode 6 and I want to use one universal storyboard instead of two storyboards. I have only worked on the iPhone storyboard and haven't touched the iPad one. Is it possible to ditch the iPad storyboard and convert the existing iPhone storyboard to be my main universal

Constraints to center and object between two objects

对着背影说爱祢 提交于 2019-12-21 07:46:03
问题 My design requires that a button is centered between two other objects. One of the objects is in the vertical center of the view (green). The other object is some distance from the bottom edge (green). Now the task is to center the third object (red) between the other two. I am using xcode6's new constraints and my view is in wRegular hRegular mode. This would be easy with code, but I am trying to use the storyboard to accomplish this. 回答1: There are a number of approaches: In iOS 9, the

Constraints to center and object between two objects

心不动则不痛 提交于 2019-12-21 07:45:47
问题 My design requires that a button is centered between two other objects. One of the objects is in the vertical center of the view (green). The other object is some distance from the bottom edge (green). Now the task is to center the third object (red) between the other two. I am using xcode6's new constraints and my view is in wRegular hRegular mode. This would be easy with code, but I am trying to use the storyboard to accomplish this. 回答1: There are a number of approaches: In iOS 9, the

Constraints to center and object between two objects

青春壹個敷衍的年華 提交于 2019-12-21 07:44:08
问题 My design requires that a button is centered between two other objects. One of the objects is in the vertical center of the view (green). The other object is some distance from the bottom edge (green). Now the task is to center the third object (red) between the other two. I am using xcode6's new constraints and my view is in wRegular hRegular mode. This would be easy with code, but I am trying to use the storyboard to accomplish this. 回答1: There are a number of approaches: In iOS 9, the

Variable width & height of UICollectionViewCell using AutoLayout with Storyboard (without XIB)

本秂侑毒 提交于 2019-12-21 07:31:42
问题 Here is an design issue in the app that uses AutoLayout, UICollectionView and UICollectionViewCell that has automatically resizable width & height depending on AutoLayout constraints and its content (some text). It is a UITableView list like, with each cell that has it's own width & height calculated separately for each row dependant on its content. It is more like iOS Messages build in app (or WhatsUp). It is obvious that app should make use of func collectionView(collectionView:

Cocoa - How to connect view's delegate to file's owner in storyboard mode?

自作多情 提交于 2019-12-21 07:19:16
问题 When I use an .xib, I connect a view's delegate to the File's Owner via interface builder, then go into the view controller's .h file and set it as the delegate to complete the connection via . However in storyboard mode, there is no file's owner object. I am using an engine called NinevehGL, which simplifies the process of rendering models with openGL. This engine requires that I create a view, set it's class to NGLView, connect it's delegate to the file's owner object, and add to the header