storyboard

Identify which Storyboard is active

倖福魔咒の 提交于 2019-12-13 18:17:17
问题 I need to work out how to identify what storyboard is active at any given time. I have a specialised nativation in which I need to identify the storyboard (UIView) then change things programmatically depending on what the user presses. All storyboards have Identifiers. in the viewDidLoad of the root view I have the following. (void)viewDidLoad self.topViewController = [storyboard instantiateViewControllerWithIdentifier:@"View1"]; { What I would like to do is identify which storyboard the user

Renaming class causes IBOutlet connection to fail

泄露秘密 提交于 2019-12-13 15:24:12
问题 I renamed a class, which happened to have an outlet connection to a label called mainLabel in a storyboard file. When I run my program, it crashes and gives me the error: "this class is not key value coding-compliant for the key mainLabel". Other SO answers have shown this to be caused by a bad outlet connection, so I removed the connection and removed any lose ends. When trying to reconnect the label to an outlet in my code, I get the error Could not insert new outlet connection: Could not

Saving and Restoring Application State on iOS 6 without Storyboards

旧城冷巷雨未停 提交于 2019-12-13 13:39:10
问题 I have done test app following this tutorial I try to do the same without using Storyboards and it isn't work. I have enabled state preservation and restoration in AppDelegate. I have assigned restorationIdentifier to all my controllers and their views. I think i have to implement some additional code in AppDelegate to restore rootviewcontroller, but i cannot find the right way to do this. -(BOOL)application:(UIApplication *)application shouldRestoreApplicationState:(NSCoder *)coder { return

Xcode : Storyboard and retaining data in each controller

ε祈祈猫儿з 提交于 2019-12-13 13:08:58
问题 As you can guess i am a new programmer and i have trouble getting a simple thing! I am making an app with multiple view controllers. Each controller have textfields and UIsegmentedControl items. When i am moving from one view controller to the other (uding modal trantition if that matters), the contents of the previous one (textfield entries and segmented control option) reset to their original state. How can i make them keep their previous state? Thanks in advance. 回答1: -(void)

How to load storyboard file from custom bundle in IOS app?

删除回忆录丶 提交于 2019-12-13 12:33:46
问题 I have an ios app that I am modifying so that it can simply plug-in to a series of other apps as a static library. However, I also need to have all the corresponding resources as well, so I created a custom bundle to include these. The bundle includes all the tab bar images, localizable strings, default images, and, most importantly for this question, the storyboard files. When I run the app, it can't find the storyboard files in the custom bundle. My project is layed out as follows: Hmmmm..

How to animate Opacity of a DropShadowEffect?

血红的双手。 提交于 2019-12-13 11:46:27
问题 I have a WPF project with a border using the following style. The plan is to get the glow effect to fade in when the mouse moves over the border, and fade out when it leaves. <Style x:Key="BorderGlow" TargetType="Border"> <Style.Resources> <Storyboard x:Key="GlowOn"> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(DropShadowEffect.Opacity)"> <SplineDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/> </DoubleAnimationUsingKeyFrames> </Storyboard> <Storyboard x:Key=

Custom Keyboard Storyboard with Xcode 8 beta

和自甴很熟 提交于 2019-12-13 09:27:14
问题 I'm having some problems designing my custom keyboard from the storyboard in Xcode 8 beta 6. For some reason when I launch the keyboard on a iOS 10 device this is the result: This is how i design it in the Storyboard, Top View: Bottom View: So it displays only the height of the bottom view. I don't have this problem with iOS 9. Any ideas on what is going wrong? UPDATE : this it's how the keyboard gets loaded in iOS 9: UPDATE 2: Even creating the view programmatically this way in viewDidLoad()

how to pass data between these two view controllers in swift

↘锁芯ラ 提交于 2019-12-13 08:59:35
问题 in this case i have tabbar controller and navigation controller between the two VC,which means firstly i want to pass data between the first VC and the tabbar controller, and secondly i want to pass the same data from the tab bar controller to navigation controller , and finnally to the last VC,i searched for example in the net but i didn't find anything useful. please can u help me pass data between these two viewcontrollers ,any example will be great, thaank's. 回答1: Set an identifier to the

Display whole ViewController within another ViewController's view

夙愿已清 提交于 2019-12-13 08:19:29
问题 Im writing an application which the main view controller is a UIViewController . It has some icons in a grid and I want to dismiss (sliding down) this grid when one of the icons is clicked. This I've done already. The problem is: when the grid is dismisseed I want another View to come from the top of the screen. This view is in this same root view controller. But I want to display the content of other view controllers in this view. For example: I want this view to show a

Decide Appearance Screen iOS

不羁的心 提交于 2019-12-13 07:45:20
问题 please refer image below : I want to start app 'directly' on "VIEW 1" screen or "VIEW 2" screen, without visual appearance of "START" screen which decide VIEW screen to display. Eg. in loadView() of STARTviewcontroller.m if (some condition) { call "VIEW 1" screen } else { call "VIEW 2" screen } Is this best way to do it ? what should i use segue / [self presentViewController: ...] ?? 回答1: Do one thing. Set " View1 " controller as initial view controller in your storyboard. Now And in your