storyboard

Difference between dragging UIViews into storyboard and creating them programmatically?

杀马特。学长 韩版系。学妹 提交于 2019-12-25 02:52:25
问题 Hi I am new to iOS programming and am wondering what is the difference between dragging a UIView into the storyboard and create them programmatically. I am using an iPad for development. I have a UISplitView . Inside the Appdelegate.m , I created a UISplitViewController programmatically: MyTableViewController* orders = [[MyTableViewController alloc] initWithClassName:@"Order"]; MyDetailsViewController* details = [[MyDetailsViewController alloc] init]; UISplitViewController*

performing programmatic segue after unwind

♀尐吖头ヾ 提交于 2019-12-25 02:28:37
问题 I have two View Controllers, V1 and V2. V1 presents V2 with a modal segue in storyboard. I then have an unwind segue that dismisses V2 to go to V1. The Done action belowed is then called. It prints out the correct NSLog's, however the [self performSegueWithIdentifier:@"viewmessagessegue" sender:self] does not get initiated. I use that same line of code when a button in V1 is pressed, and it works correctly in that scenario. I'm confused as to why it's not being called... - (IBAction)done:

Ease function is automatically turned off in wpf animation after some time

不羁的心 提交于 2019-12-25 02:26:36
问题 WPF and c#. Animation in c# code. I have animation of path with many points (>1000). Animation is created programatically using one storyboard and point animations with ease function. Repeat behavior is set to forever. After some time ease function turns off. I think it's some kind of optimalization. Can I turn this off so that ease function will be set also forever? This is my mainwindow_loaded function. I have only one Grid named grid in my xaml code. void MainWindow_Loaded(object sender,

WPF Storyboard requires TargetName

淺唱寂寞╮ 提交于 2019-12-25 02:12:32
问题 I have popup "Now playing" window in my app, and now I want to apply any cool effect to its show/hide. I don't want to create/dispose window each time I need to show/hide it, so I suppose I can't use Window.Triggers . I created sample storyboard and invoke it from code-behind; So it instantly fall into exception No target was specified for 'System.Windows.Media.Animation.DoubleAnimation . I found this answer and added Storyboard.TargetName attribute. <Window.Resources> <Storyboard x:Key=

custom cell not appear when loading new views objective-C

泪湿孤枕 提交于 2019-12-25 01:49:03
问题 I create a UITableView programmatically with different cells and sections that connects to the other views in storyboard But if you check the story board absence view has custom cell with check box sections that it's not appear here My question is: why it doesn't shows the custom cell?,would you please helping me Thanks in advance! Here is my code: - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([segue.identifier isEqualToString: @"WorkTime"]){ [segue

How To Navigate Objective-C App Programmatically Without Using Only Storyboard?

自古美人都是妖i 提交于 2019-12-25 00:24:23
问题 I am having trouble navigating my application. I have written a game scene completely in Sprite Kit (all buttons, etc. using SKNodes) with Objective-C. When the user opens the app, it presents a main menu which is built completely in Storyboard and contains a UIButton that triggers a transition to the ViewController with my game scene in it. Originally, to restart the game once the user lost I just presented a new scene like this: GameScene *newScene = [GameScene sceneWithSize:self.view

How do you take the results of the UISearchbar in Storyboard and use those results in another viewpoint?

a 夏天 提交于 2019-12-24 23:44:55
问题 Okay, this is a very simple question but it has been frustrating me for so long. I create a viewpoint in the Storyboard and put a search bar and search display controller on the top. How do I take the results of the search bar and store it in an object and pass that object into a different view? I tried making another class for UIViewController and messing with the "prepareforsegue" method, but that resulted in a black screen. I kind of want a search bar like this: http://www.appcoda.com/how

Aspect ratio NSLayoutConstraint in UITableViewCell is breaks

梦想的初衷 提交于 2019-12-24 20:42:32
问题 I'm trying to set appropriate NSLayoutConstraint s for a UIImageView in a UITableViewCell . The desired constraints are as follows: 16:9 aspect ratio 0 leading 0 trailing 11 top 11 bottom The UIImageView is the sole subview of the cell's contentView. I have set tableView.rowHeight = UITableViewAutomaticDimension and tableView.estimatedRowHeight = 80 2018-03-28 15:52:30.454688-0400 TestApp[28844:694668] [LayoutConstraints] Unable to simultaneously satisfy constraints. Probably at least one of

给Storyboard设置初始页面(Initial Controller)

不问归期 提交于 2019-12-24 19:30:02
原文: https://developer.apple.com/library/ios/recipes/xcode_help-IB_storyboard/Chapters/SetInitialController.html 方法一: 1、在Xcode中,打开Storyboard,并打开utilities区域的attributes窗口。 2、选中要设置为初始页面的View Controller或者Window Controller。 3、设置如下: iOS 的ViewController: OS X的ViewController: OS X的WindowController: 方法二: 如上图,在Storyboard中,初始页面的前面会有一个箭头,如果想把其他页面设置为初始页面,只要把这个箭头拖拽到其他的页面即可。 来源: https://www.cnblogs.com/tt2015-sz/p/5031742.html

iOS - prepareForSegue doesn't wait for the completionBlock to be completed

╄→尐↘猪︶ㄣ 提交于 2019-12-24 18:37:18
问题 What I like: Wait until data download completes then open TableView and show data . What I have: When prepareForSegue is called the TableView opens immediately without waiting for the data download although I have a completionBlock (which may not be implemented correctly I guess). Note: When I go back and open the TableView again I see the data . - (void)fetchEntries { void (^completionBlock) (NSArray *array, NSError *err) = ^(NSArray *array, NSError *err) { if (!err) { self.articlesArray =