uistoryboard

Xcode 6 beta 7: storyboard adds extra space on right and left sides

五迷三道 提交于 2019-12-28 08:07:24
问题 When I add subview to root ViewController's view, and with auto layout setup leadingSpace,trailingSpace,topSpace and bottomSpace to zero, there are appear some extra spaces on left and right sides (so if I print subview's frame its origin will be 16 and size less on 32 than should be). So actually we get that leading and trailing spaces are not zeros... As you can see on picture leading space - zero, but origin.x = 16 Earlier I wasn't working hard with auto layout, so my question is: Is it a

How to set one of the screens in landscape mode in iphone?

≯℡__Kan透↙ 提交于 2019-12-28 06:55:10
问题 I am developing iphone application in iOS7, i am facing problem in autorotate single screen in landscape mode programatically, while other screens remains in portrait mode. I am using Story board. 回答1: I used following and its working for me in both iOS6 and iOS7 also,try following way : // Added method for Autorotation in you app delegate - (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{ //NSLog(@"AppDelegate --

Xcode 6: can't connect any IBOutlet to ViewController

放肆的年华 提交于 2019-12-28 04:02:07
问题 After upgrading to Xcode 6, I opened an old project (that contains a subproject, so it has many targets) and I noticed that no link from my Storyboard ViewContoller to the relative Objects works. For example I have a ViewController with a TableView inside and now I cant do can't do anyhing with it because the connection is missing, I can't even redefine a new IBOutlet in the VC because the arrow in the storyboard from the VC won't connect to anything. To be more clear: The class is defined in

xcode 4.5 how to pick storyboards at launch

微笑、不失礼 提交于 2019-12-28 01:45:45
问题 Trying to make my app work with both iPhone 5 and iPhone 4/4s. I tried the "AutoLayout" but does not seem to work for my app also read that it is not supported in iOS 5. AutoLayout specifically fails on a view controller that has an UIScrollview and a UIPicker that is re-sized in code. Having two Storyboards one for 4 inch and one for 3.5 inch seems the way to go. The two Storyboard aproch seem to be the solution for me. So this leaves me with two questions; Where should the code to detect

iOS 7 | Navigation bar / Toolbar buttons very close to status bar

与世无争的帅哥 提交于 2019-12-28 01:42:12
问题 I have a problem when dragging a navigation bar or toolbar (storyboard) to my view controller. UINavigationBar: As you can see in the image above, the right button is almost overlapping the status bar. With a UIToolbar it happens the same: This view controllers are intended to be used as a Modal, that's the reason I'm not using a UINavigationController. In another section I use a UINavigationController and it appears as I expect: How can I drag a UINavigationBar / UIToolbar to a view

Using Multiple Storyboards in iOS

∥☆過路亽.° 提交于 2019-12-27 12:08:17
问题 My objective is to create a tabbed application, then the view for each of the tabs are constructed in separate storyboards. My mainstoryboard is a tab view. Then I create a secondary storyboard (storyboard#2) with 2 View Controllers. The first view controller (also ticked as initial) have a button, and segue (modal) to 2nd view. I managed to load the view by subclassing and overriding loadView from storyboard#2. Here's the simulator output. When click on the "click me" button, I get a EXC_BAD

IBOutlet is nil, but it is connected in storyboard, Swift

和自甴很熟 提交于 2019-12-27 11:04:31
问题 Using Swift 1.1 and Xcode 6.2. I have a UIStoryboard containing a singular, custom UIViewController subclass. On it, I have an @IBOutlet connection of type UIView from that controller to a UIView subclass on the storyboard. I also have similar outlets for subviews of that view. See figure A. But at run time, these properties are nil (Figure B). Even though I have assured I've connected the outlets in Interface Builder. Thoughts : Is it possible that because I am using a subclass of a subclass

IBOutlet is nil, but it is connected in storyboard, Swift

荒凉一梦 提交于 2019-12-27 11:04:06
问题 Using Swift 1.1 and Xcode 6.2. I have a UIStoryboard containing a singular, custom UIViewController subclass. On it, I have an @IBOutlet connection of type UIView from that controller to a UIView subclass on the storyboard. I also have similar outlets for subviews of that view. See figure A. But at run time, these properties are nil (Figure B). Even though I have assured I've connected the outlets in Interface Builder. Thoughts : Is it possible that because I am using a subclass of a subclass

iOS 8 Autolayout with Size Classes

 ̄綄美尐妖づ 提交于 2019-12-25 14:58:10
问题 This is driving me crazy. All I need is to align the subview to superview & fill its bounds. To do this, all I used to do is create 4 Autolayout constraints for subview in storyboard and set top, left, bottom, right margins to 0 relative to subview. But in Xcode 6, with Size classes enabled, the left and right margins default to -16 and setting them to 0 has no effect. No matter what I do, the subview never fills superview bounds and there are few pixel gaps on the left and right. How do I

Parallax on tableview image, using Auto Layout

拟墨画扇 提交于 2019-12-25 09:59:14
问题 I have several tableview cells which are wider than they are tall. As such, I'm implementing a parallax scroll so you can see more of the image as you scroll up/down Example of desired effect Following some code examples nearly gets me there, but as I'm using AutoLayout, I find there is a 'jump' when you first start scrolling, due to the difference in actual image positions and the expected position. I've tried calling the layout function on both viewDidAppear and didLayoutSubviews to try and