uiviewcontroller

Views getting darker when are pushed on navigation controller

守給你的承諾、 提交于 2019-12-22 04:11:53
问题 I'm pushing ViewControllers on NavigationController by segues. I have my own subclassed NavigationController which has inserted UIImageView at index 0 - it's a background for my entire application. The problem is that I can see that when new view controller is coming to the screen from the right side, in the beginning it's like having some light dark overlay which is disappearing when just after viewDidApear is called. Every view controller has a self.view.backgroundColor = [UIColor

UITableView within a UIViewController

帅比萌擦擦* 提交于 2019-12-22 04:05:26
问题 How can I use a uitableview inside of a uiviewcontroller? Below is an example of what I'm trying to do (except this is just the UITableview in my Storyboard): I've figured out that I need to add the delegate and data source to my header: //MyViewController.h @interface MyViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> In my Implementation file, I've added the required methods: //MyViewController.m - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView

willTransitionToTraitCollection not get called, why?

こ雲淡風輕ζ 提交于 2019-12-22 04:05:22
问题 I am trying to replace didRotateFromInterfaceOrientation with willTransitionToTraitCollection - in a UIViewController subclass - as doc says, but method is not get called when I am rotating device. Why? 回答1: If you're testing this on iPad it has regular trait collections for vertical and horizontal class for both orientations, thus it will not call this method when orientation changed. 来源: https://stackoverflow.com/questions/25634085/willtransitiontotraitcollection-not-get-called-why

iPad modal form sheet takes up the whole screen anyways

家住魔仙堡 提交于 2019-12-22 03:42:22
问题 I'm trying to create a form sheet modal on iPad, which should be a 540x620 modal view. I've created a view controller with a NIB file whose view is a 540x620 sized UIView (with stuff on it). I set the modal presentation style to UIModalPresentationFormSheet , and call presentModalViewController:animated: on the current view controller. My view slides in from the bottom, but instead of being a form sheet, it takes up the whole screen (my view elements are all anchored in the top left of the

Underlying view disappears during game-center authentication

扶醉桌前 提交于 2019-12-22 01:36:15
问题 I have an iOS application that I'm just starting to implement game center support for. I call the authenticateWithCompletionHandler method during loadView for my main (root) view controller. My main view displays, and shortly later the "sign in to game center" dialog appears exactly as expected. If "Create New Account" is selected, the game center "New Account" pop-over dialog displays in the middle of the screen (this is on an iPad) -- but my underlying main menu disappears. Underneath the

NSConcreteMapTable backdropView:willChangeToGraphicsQuality: …error

核能气质少年 提交于 2019-12-22 01:29:14
问题 I'm developing an iPad app to help me to manage my expenses when I'm abroad. I have a split view with the classical master and detail views. In the master there is the list of the expenses and in the detail view, guess what? The details of every expense! When I tap on a button in the detail a new view is loaded using a modal segue with a Form Sheet. The user insert a number and if that number is bigger than a certain value the colors of the labels in the master and in the detail will change.

Reuse parent ViewController storyboard file in Child ViewController

廉价感情. 提交于 2019-12-22 01:23:22
问题 Presenting ViewController Using storyBoard: if newViewController is in StoryBoard.we can present it using the following method. let storyboard = UIStoryboard(name: "AViewController"), bundle: UIBundle.main) let newViewcontroller = storyboard.instantiateInitialViewController() as? AViewController self.present(newViewcontroller, animated: false, completion: nil) Is it Possible to present a ViewController which is not in storyBoard but its parent viewcontroller has storyboard I have create a B

How to pass data from one view to another view in iphone [duplicate]

蓝咒 提交于 2019-12-22 01:22:47
问题 This question already has answers here : How do I pass variables between view controllers? (6 answers) iPhone: How to Pass Data Between Several Viewcontrollers in a Tabbar App (3 answers) Closed 6 years ago . I want to pass int or string data from one view to another, please help me NSUInteger i1 = [array indexOfObject:username]; SSPUserLogedInViewController *logInView = [[SSPUserLogedInViewController alloc] init]; logInView.modalTransitionStyle = UIModalTransitionStyleCoverVertical; [self

Login Screen using Storyboard

自作多情 提交于 2019-12-22 01:09:48
问题 I am new to iOS 5 and trying to write my apps as pure iOS 5 app using the new storyboard feature. I have a start screen (Login Screen) so I do not want to use navigationcontroller because i don't need any user to go back for a log-in screen after log-in successfully moreover, i don't need navigationbar because it's affect on the Home Screen Design. So, I need to do a manual segue to the login screen, after checking the username and password for login: If(Login Successful) Navigate to the Home

Segue from GameScene to a viewController Swift 3

混江龙づ霸主 提交于 2019-12-21 23:18:47
问题 I need to make a segue from a GameScene to a UIViewController. My code so far is the following: In the GameViewController.swift I added: if let view = self.view as! SKView? { if let scene = SKScene(fileNamed: "GameScene") { scene.scaleMode = .aspectFill scene.viewController = self view.presentScene(scene) } ... and in my GameScene.swift I added class GameScene: SKScene, SKPhysicsContactDelegate { var viewController: UIViewController? ... as well as func returnToMainMenu(){ self.viewController