uistoryboard

Disabling segue animation

余生颓废 提交于 2020-01-01 04:17:16
问题 I want to Show (e.g. push) segues in my storyboard, to connect my viewcontrollers and my navigation controller. Then the navigation bars on the viewcontrollers will show correctly. For example: With show detail or present modaly, the navigation bar will disappear But I don't want segue animation. Xcode is giving the warning like : "Disabling segue animation is not available prior to iOS 9.0" And I wants deployment target of iOS 7.0 or 8.0 How can I solve this? Thanks in advance. 回答1: You can

Swift: Force show Navigation Bar in Modal

一曲冷凌霜 提交于 2020-01-01 02:01:50
问题 I have the following Storyboard Segue in my Swift project: The animation is correct, but there is no navigation bar in the destination view controller. I want to force the destination view controller to have a navigation bar. I tried in the destination view controller: override func viewWillAppear(animated: Bool) { super.viewWillAppear(true) navigationController?.navigationBar.hidden = false } Or: override func viewWillAppear(animated: Bool) { self.navigationController?.setNavigationBarHidden

application:didFinishLaunchingWithOptions: firing notification before destination controller is created

≯℡__Kan透↙ 提交于 2019-12-31 13:48:09
问题 Hello, I am writing an app that should respond with an UI update and an internal status change when a local notifcation is used to open it. I am using storyboards and I have set up my main view controller to observe status changes: - (void)viewDidLoad { [super viewDidLoad]; // ... [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(resumeByNotification:) name:@"Resume" object:nil]; } In my app delegate I have this: - (void)application:(UIApplication *)application

application:didFinishLaunchingWithOptions: firing notification before destination controller is created

♀尐吖头ヾ 提交于 2019-12-31 13:45:09
问题 Hello, I am writing an app that should respond with an UI update and an internal status change when a local notifcation is used to open it. I am using storyboards and I have set up my main view controller to observe status changes: - (void)viewDidLoad { [super viewDidLoad]; // ... [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(resumeByNotification:) name:@"Resume" object:nil]; } In my app delegate I have this: - (void)application:(UIApplication *)application

iOS - UIButton on UIPageControl not working

淺唱寂寞╮ 提交于 2019-12-31 05:22:05
问题 I am using UIPageControl as indicator between different page (view controllers) of my application. In each of the view controllers, I need to have a different button on the left corner on the UIPageControl. If I place a UIButton at that position on each of the view controllers, I see it on the UIPageControl but the buttons do not respond to the touch event. Is there something I am missing? Or is there an alternative to do this? Thanks. 回答1: I guess the page control and the view controller

Resize NavigationController in InterfaceBuilder

坚强是说给别人听的谎言 提交于 2019-12-31 01:50:27
问题 This could be a daft question, but is there a way to resize the Navigation Controller in a storyboard? It simply takes up too much screen space. Most of my views are pop-overs at the right size but then have a huge iPad size Navigation Controller next to them. This is purely for visual work in Interface Builder as I have about 20 different screens and it's getting a bit crowded. 来源: https://stackoverflow.com/questions/10988168/resize-navigationcontroller-in-interfacebuilder

How to set a max limit for an IBInspectable Int

為{幸葍}努か 提交于 2019-12-30 08:59:43
问题 I am using an IBInspectable Int in Swift to choose between 4 four shapes (0-3), however it is possible in the storyboard editor to set a value greater than 3 and less than 0, which stops the IBDesignable system working. Is it possible to set a min and max limit of what values can be set in the storyboard editor? let SHAPE_CROSS = 0 let SHAPE_SQUARE = 1 let SHAPE_CIRCLE = 2 let SHAPE_TRIANGLE = 3 @IBInspectable var shapeType: Int = 0 @IBInspectable var shapeSize: CGFloat = 100.0 @IBInspectable

UITableView embedded in other view has wrong position of section header

喜你入骨 提交于 2019-12-30 04:47:06
问题 I have a UITableView embedded in another view like so: The navigation controller is displayed modally, so its layout should be full screen and not depend on any other parts of the storyboard. If have set up the upper part of the profile view with fixed auto-layout constraints like so: top layout guide to image view (the gray one): 20pt image view to "Transactions" label: 20pt "Transactions" label to container view: 20pt container view distance to bottom layout guide, leading and trailing

How to dismiss a modal that was presented in a UIStoryboard with a modal segue?

随声附和 提交于 2019-12-30 00:17:09
问题 Setup: I have a storyboard set up, with two simple view controllers A and B. There is a button in A, that transitions to B with a modal segue. B is presented with a modal transition on top of A. It’s fine. Question: is there a way to pop B away and get back to A with some simple storyboard magic? Note that if this was all in a navigation controller, and I used a push segue, it would be implicitly be taken care of by navigation controller. There would be a “back” button. There’s nothing

Can I create a WatchKit app without a storyboard (entirely in code)?

时光总嘲笑我的痴心妄想 提交于 2019-12-29 07:25:22
问题 My team is currently working on an iOS application in which we don't use storyboards at all. We create the UI in code instead. So for consistency's sake it would be great if we could create a Watch App target entirely in code. However, both the "Getting started with WatchKit" video and WatchKit Framework Reference mention that you need a storyboard for the Watch App target. Furthermore, in WKInterfaceObject.h the init method is marked as unavailable: - (instancetype)init NS_UNAVAILABLE; So is