xib

Adding iPad XIB/VIEW to a “View Based Application” in iOS 4

梦想的初衷 提交于 2019-12-11 17:26:39
问题 I've created a View Based Application in XCode4 and trying to do the code and UI design according to the way Apple have intended it to be. So I designed the UI in the AppNameViewController.xib and it works fine; now I want to enable it as a UNIVERSAL application that runs on iPad as well. I changed the App-Target>>Summary>>Devices from iPhone to Universal and miraculously XCode had automatically created MainWindow-iPad.xib (Apple, very nice...), but since I designed the application first

Loading main XIB makes app crash on iOS 3.0

我的梦境 提交于 2019-12-11 17:25:46
问题 thank you for taking some time to read my question. I have this app (In Cydia), which has around 10% of users with iOS 3.0, so I want to support them in my next update . I tested it with actual devices running, iOS 4.0 and 5.0.1; it worked fine. But on iOS 3.0 it crashes with an exception: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: ' -[NSKeyedUnarchiver initForReadingWithData:]: incomprehensible archive (0x4e, 0x49, 0x42, 0x41, 0x72, 0x63, 0x68, 0x69)

AVPlayerViewController pops all UIViewControllers from UINavigationController when exits from fullscreen (iOS 13)

白昼怎懂夜的黑 提交于 2019-12-11 17:00:54
问题 Note that this problem occurs specifically in iOS 13. The same code and structure works perfectly on iOS 10~12. The app plays video on a UIViewController that is pushed into the UINavigationViewController. The video plays fine and goes to full screen as usual but when I press the done button to exit the fullscreen, the entire stack of UIViewControllers gets popped and it lands in the home view. I'm using xib, swift 5, Xcode 11 Here's the code where I create the player and play the video: let

How are the 2 View Controllers wired to the tabBarController in iPhoneRecipes

扶醉桌前 提交于 2019-12-11 16:59:32
问题 I am learning iPhone programming by reviewing the iPhone Recipes sample application. I am puzzled with how the two view controllers are wired to the tab bar. If they are wired in the XIB, can anyone explain how it is done or where I can get more visually aided details on connecting things in the XIBs. This is my starting point in the learning process: - (void)applicationDidFinishLaunching:(UIApplication *)application { recipeListController.managedObjectContext = self.managedObjectContext;

Can't access managed object context when view is initializing

五迷三道 提交于 2019-12-11 16:17:41
问题 I am using a MainWindow.xib file that has the following configuration: MainWindow.xib UITabBarController UINavigationBarController UITableViewControllerAlpha UINavigationBarController UITableViewControllerBeta UINavigationBarController UITableViewControllerCharlie But based on the following post: Why does Core Data initialization fail when I attempt to do it at these points? and the breakpoints that I've placed, I've come to the conclusion that initWithCoder is being used to init all of the

UIViewController defined in a xib file doesn't load in the storyboard

白昼怎懂夜的黑 提交于 2019-12-11 15:31:36
问题 I'm trying to load a subclass of a UIViewController with its views defined in a xib file into a storyboard. Let's call it a NibViewController. The point of this approach is to reuse the same ViewController in multiple screens of the app. I know it's possible to do it manually in the code, but I'm looking for a solution in the storyboard. I've tried suggestions from other topics like this one, but nothing worked. The ViewController is correctly displayed in the simulator but not in the

Battling with Xcode not displaying my UIWindow

只愿长相守 提交于 2019-12-11 12:22:28
问题 See edit at the end of the question I'm trying to get a simple iPhone app up and running and failing miserably :( I have a very simple set up. I have an app delegate, a view controller, and an xib file containing a UIWindow with a UIImageView and three UIButton s on it. The problem is that when I start my app, the UIWindow never gets displayed. I'm sure I'm just missing some sort of connection in Interface Builder (I'm running XCode 4, by the way). I'm just completely lost as to what might be

Objective C - Pick random NIB file?

本秂侑毒 提交于 2019-12-11 11:30:46
问题 Hello I would like to have my app pick a randome XIB file to choose from, and exclude 3 of them. HowToPlay *LetsPlay = [[HowToPlay alloc] initWithNibName:@"HowToPlay" bundle:nil]; LetsPlay.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self presentModalViewController:LetsPlay animated:YES]; [LetsPlay release]; So i know how to load from a nib file by doing the above, but i would like it to be able to pick a random one and then exclude certain ones. The ones i want excluded:

Xcode - Weird issue with xib and auto layout (xib expands to random height)

戏子无情 提交于 2019-12-11 09:13:46
问题 I am having a weird auto layout with xib file/class issue. I have created a custom notification view (UIView subclass) in Swift that uses a xib file. When the device is in portrait orientation on load, the notification is fine. When I rotate to landscape, again the notification is fine (however, the button interactions somehow become disabled/non-respondent) When I rotate back to portrait orientation, the xib view (i.e. "self") expands to a random height ( notice the "yellow" background ,

Why can I not manipulate the objects in my xib file?

女生的网名这么多〃 提交于 2019-12-11 09:02:44
问题 I've got a file, View.xib with three UIView s in it, each of the same UIView subclass. The views all look a bit different, but they're going to be used as pages in a tutorial screen, so they have page indicators on the bottom. I made an outlet collection of the three page indicators on each page. So in the custom UIView I made an outlet collection, and for each of the three views I connected all three page indicators to the outlet collection. However, in initWithFrame: I do the following: -