storyboard

Any memory leak (or over-instantiation of objects) when using iOS Storyboard Seque “Model” or “Push” style?

萝らか妹 提交于 2019-12-10 10:07:21
问题 Let's say I'm developing a simple iPhone app with two screens: Login and Register screens. Within the Login screen, it has the "Register" button which takes to the Register screen. Likewise, within the Register screen, it has the "Login" button which takes to the Login screen. All is implemented using iOS Storyboard Segue "Modal" style. The question is: does keep adding a new view to a stack everytime a view controller is presented by a segue "Modal" style? So, if I repeatly switch between

UIDatePicker in UIDatePickerModeCountDownTimer mode: how to change to minutes and seconds mode?

本秂侑毒 提交于 2019-12-10 09:22:56
问题 I added UIDatePicker in my storyboard, and set mode to CountDownTimer. It shows hours and minutes only, but what i need is minutes and seconds mode. I don't need hour column, need minute and seconds columns. I try to change interval, but it's minimum value is 1 minute. Is it possible? How can I do this? 回答1: You can create a datasource for you minute-seconds picker. It has two Components: minute and seconds. You have to implement some methods in UIPickerViewDelegate and UIPickerViewDataSource

iOS中storyboard故事板使用Segue跳转界面、传值

浪尽此生 提交于 2019-12-10 03:55:30
iOS中storyboard故事板使用Segue跳转界面、传值 目录 (?) [+] 摘要: 在iOS的开发过程中,不可避免的要设计界面,在android中有xml设置界面和直接使用java代码设置界面控件两种方式,在之前的ios开发中也是类似的有xib文件设置界面及用代码直接设置控件两种方法,但后来又出了一种方式,就是storyboard故事板子,其实storyboard和xib文件很像,最大的不同之处在于一个xib文件对应一个ViewController视图控制器,而storyboard对应多个,基本一个应用只需要一个storyboard就可以了,不再需要为每个控制器创建一个xib文件,从这点上来说,还是很方便的,在storyboard中查看各个界面的跳转也很方便,但之前一直使用xib进行开发,对storyboard的使用不太熟悉,今天好好学习了一下其中的界面跳转和传值,用到了Segue这个东西,这里借着例子说明一下。 创建工程: 首先创建一个新的工程,这里我创建的是Single View Application,就可以自带故事板了,如下图: 创建好后可以在左边文件列表中看到Main.stroyboard,这个就是故事板文件了,因为这里要实现界面跳转,只有自带的一个ViewController不够,我们再创建一个,command+N键创建一个Cocoa Touch Class。

Storyboard - Unsupported configuration 8 conflicting constrains

余生颓废 提交于 2019-12-10 03:38:45
问题 I am using storyboard autolayout. I am noticing today, while compiling a warning message MainStoryboard_iphone.storyboard Unsupported Configuration 8 conflicting constraints Clicking on warning takes to storyboard, but not to view which is a problem. Is there a way to figure out which view/control has the problem Thanks 回答1: Right click on the "8 conflicting constraints" and select "Reveal in log". There should be a line with something like the following in your log: /path/to/storyboard

Cocoa Storyboard Responder Chain

醉酒当歌 提交于 2019-12-10 03:02:25
问题 Storyboards for Cocoa apps seems like a great solution as I prefer the methodology you find in iOS. However, while breaking things up into separate view controllers makes a lot of logical sense, I'm not clear as to how to pass window control (toolbar buttons) or menu interaction down to the view controllers that care. My app delegate is the first responder and it receives the the menu or toolbar actions, however, how can I access the view controller that I need to get that message to? Can you

Is it possible to programmatically get the identifier of a basic UIViewController from an UIViewController or Storyboard in Swift/Objective-C?

吃可爱长大的小学妹 提交于 2019-12-10 02:54:16
问题 I know that we can instantiate a particular UIViewController basing on its identifier (see below): var myPageContentViewController = self.storyboard!.instantiateViewControllerWithIdentifier("A") as PageContentViewController But my question doesn't concern that point, in other words I just would like to know if it would be possible to programmatically (in the source code) retrieve the identifier (in our case the string value "A") that I set in the storyboard for this particular

Different font size for UILabel using adaptive layout

谁说胖子不能爱 提交于 2019-12-10 02:36:54
问题 In Xcode 6 we have a new feature called adaptive layout. By using that I have created a new project in which it I need to have different font size based on the layout. In iPhone 3.5 inch screen I must have font size as 17pt, and other screen size in iPhone must be 21pt. Can anyone tell me how I can achieve this using adaptive layout? 回答1: Yes, you can do with storyboad. There is a + sign on the left of the font, click it and select the size class and choose the font size needed 回答2: In

Xcode 8.1 - How to Update Frames for All Views in a Storyboard?

我只是一个虾纸丫 提交于 2019-12-10 02:24:50
问题 In Xcode 8.1, I can update for each view in the storyboard by clicking on the "Update Frames" button. But I want to update all views, how I can do that? 回答1: It seems to update the frames hierarchically. If you select the main view or even the view controller and press the button, it will update frames for all child views. 回答2: They added one standalone button to the leftmost side in the constraints controls (it looks like a refresh button). And you can also look for "Update Frames", from the

Remove storyboard but keep animated value?

爷,独闯天下 提交于 2019-12-10 02:17:08
问题 How can I remove a storyboard in XAML (i.e. RemoveStoryboard action in a DataTrigger) but keep the value that was animated. Similar to the Animatable.BeginAnimation: If the animation's BeginTime is null, any current animations will be removed and the current value of the property will be held. 回答1: RemoveStoryboard's primary use is to remove the animated values and set them back to their un-animated state. In most cases you can just switch the call to PauseStoryboard or StopStoryboard instead

On storyboards, views and passing data along

痴心易碎 提交于 2019-12-10 02:14:07
问题 In my Xcode 4.2 storyboard, i have 2 UIViewControllers , This one time and In band camp In This one time , i have a UIButton with "silly name" on it In In band camp , i have a UILabel with "label" on it Considering that we're dealing with 2 separate classes AND we're in Xcode 4.2 using storyboards (where transition between views is setup via a segue) how can i pass "silly name" from view controller This one time to the label in view controller In band camp ?" 回答1: Set the identifier of segue