storyboard

Storyboards orientation support for xCode 4.2?

会有一股神秘感。 提交于 2019-12-29 04:41:12
问题 I upgraded to xCode 4.2 and it's new Storyboards feature. However, could not find a way to support both portrait and landscape. Of course, I did it programmatically, with 2 views, one for portrait and one for landscape, like in old days, and: if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight) { self.view = self.landscapeView; } else { self.view = self.portraitView; } But I was looking for a way to do this

Silverlight2 边学边练 之七 模板与状态

笑着哭i 提交于 2019-12-29 03:05:38
感觉书里讲的模板好复杂,看的我一头雾水。书中说常规Button组件的模板程序 打印出来需要4张纸那么多(恐怖~)。看来想利用好模板这东东还真不是件易事。 言归正传,本篇也以按键为例来练习模板(Template)与状态(State)相关知识。 首先要了解一下Button的状态,Button一共有2个状态组、6种状态: CommonStates :Normal、MouseOver、Pressed、Disabled FocusStates :Focused、Unfocused 下面来了解一下如何利用这些状态为Button设定模板,先看Demo效果: XAML Code: <UserControl x:Class="TemplateTest.Page" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="400" Height="120"> <!--创建Resource--> <UserControl.Resources> <!--创建Button模板--> <ControlTemplate x:Key="ButtonTemplate" TargetType="Button"> <!-

OS X storyboards: using “show” segue without allowing duplicate new windows to show?

↘锁芯ラ 提交于 2019-12-29 01:28:53
问题 Right now I have an OS X storyboard app that has a main window, and a button on it that triggers a "show" segue for another view controller. Right now I've got the segue set up as modal because if I don't, the user could click the same button again and end up with two copies of the same window. Is there a way for me to accomplish this without having to restructure the storyboard to embed these view controllers in a separate window controller (which would seem to defeat the purpose of the

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

Push Notification -didFinishLaunchingWithOptions

痴心易碎 提交于 2019-12-28 05:52:34
问题 When I send a push notification and my app is open or in the background and I click on the push notification, my application redirects to PushMessagesVc viewController ( as intended ) I use the code as below for this: -(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { UIStoryboard *mainstoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]; PushMessagesVc *pvc = [mainstoryboard instantiateViewControllerWithIdentifier:@

IBOutlet properties does not update when using prepareForSegue method

两盒软妹~` 提交于 2019-12-28 03:11:05
问题 I am having problem passing value to a IBOutlet property of destinationViewController but it works fine on ordinary property see code below - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([segue.identifier isEqualToString:@"NewsCellToDetail"]) { testViewController *viewController = segue.destinationViewController; viewController.titleLabel.text = @"test"; // set the IBOutlet label text to something NSLog(@"%@",viewController.titleLabel.text); // this will output to

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

Designing inside a scrollview in xcode 4.2 with storyboards

别等时光非礼了梦想. 提交于 2019-12-27 20:08:27
问题 I have a vertically scrolling uiscrollview - imagine an 'about this app' page of a tab bar app which goes on a bit and requires a scrollview. It only contains a few images, a video and some text (only the video has been coded in - the rest have been placed in the GUI). In storyboard (Interface Builder?) Xcode 4.2, everything is set up as it should be and works fine, but the view is only as large as what you see on the screen, is it not possible to manually arrange in storyboard the items that

Storyboard issue with Xcode 6 and 7

落花浮王杯 提交于 2019-12-25 18:40:20
问题 Why my Main Storyboard appears like shown at Above? I made a copy of the project but now both of them have the same problem with the storyboard! I can run the app using the simulator and it works fine, but I can't see any labels or the buttons. 回答1: The problem is with your device layout.... Actually it makes on other layout like wAny hAny and now you show it on other layouts like wCompact hRegular ....thats why the problem occurs... Here is the visual site of it.... To prevent this type of

Stop Game App if Home Button clicked iOS [closed]

怎甘沉沦 提交于 2019-12-25 18:06:14
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 4 years ago . I don't know if by Apple's rules it's necessary to implement that when a user is in the middle of a game, if they click on home button the game pauses and when they click back in game, the game unpauses. Do I have to click something on storyboard for a home button to appear? I don't know. Since