presentviewcontroller

How can I call presentViewController in UIView class?

一个人想着一个人 提交于 2019-12-07 16:28:39
问题 There is a custom tab in in my project that is on every screen of the app, so i made custom UIView class and xib file and added buttons in them. Now i want my buttons for navigations on different screens having different story board ids. But i can't call presentViewController from UIView class. Previously i custom function in extension class to navigate between screens but UIView class also can't call that function. import UIKit @IBDesignable class tab: UIView { var view: UIView! @IBAction

How to dismiss two UIViewControllers in iOS 8?

和自甴很熟 提交于 2019-12-07 11:36:20
问题 I am working on iPhone application using Objective C. As I need to dismiss two UIViewControllers at once, so I am using below code : [self.presentingViewController.presentingViewController dismissViewControllerAnimated:YES completion:nil]; This code is working fine in iOS6 and iOS7, but it is not working in iOS8. I have checked by using breakpoint, my ViewController viewDidLoad and viewWillAppear method is calling but my view is not loading at all, so as an output, I am getting blank white

Dismissing a ViewController lower in the stack does not behave as expected

﹥>﹥吖頭↗ 提交于 2019-12-06 21:29:56
问题 I'm building a complex app that has kind of a branch in the middle. At some point in the app, a particular UIViewController is presented, we'll call it mainViewController (shortened mainVC ). The mainVC presents another view controller, by code, using the following code (I strip out parts of it for privacy reasons): UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"SecondaryStoryboard" bundle:secondaryBundle]; SecondViewController *secondVC = [storyboard

Presenting a View Controller with a button in a UITableViewCell programmatically (Swift)

烂漫一生 提交于 2019-12-06 20:12:48
问题 I am trying to make it where when a user clicks on a table view cell in my table view it takes them to a new view controller. More specifically, when a user clicks on a persons username it should take them to that users profile. the username being the table view cell and the profile being the new view controller. I thought the way to do this was to use the ".presentViewController(vc, animated: true, completion: nil) however when i do this it says "myCell does not have a member named

declares the selector presentviewcontroller

白昼怎懂夜的黑 提交于 2019-12-06 11:18:32
问题 Hello I have a little problem. I got an application for a project, but it is a somewhat old application (IOS 7). I saw on the internet how to update the UIAlertController Using INSTEAD of good-old UIAlertView. if (error.code) { cancelBlock = block; UIAlertController *alert = [UIAlertController alertControllerWithTitle: @"Message" message: @"Peripheral Disconnected with Error" preferredStyle: UIAlertControllerStyleAlert]; UIAlertAction *alertAction = [UIAlertAction actionWithTitle: @"OK" style

Present View Controller not working with ios 9

北城以北 提交于 2019-12-06 05:22:19
问题 Present view controller is not working with ios 9, when I press the button it not redirected to present view controller. Why this happens ? I had tried the below code RegistrationViewController * viewController =[[UIStoryboard storyboardWithName:@"Registration" bundle:nil] instantiateViewControllerWithIdentifier:@"RegistrationViewController"]; [self presentViewController:viewController animated:YES completion:nil]; I had also tried the below code UIStoryboard* storyboard = [UIStoryboard

Slow presentViewController performance

孤者浪人 提交于 2019-12-06 02:26:35
问题 I am using UIViewControllerTransitioningDelegate to build custom transitions between two view controllers (from a MKMapView ) to a custom Camera built on ( AVFoundation ). Everything goes well until I call the presentViewController and the phone seems to hang for about 1 second (when I log everything out). This even seems to happen when I am transitioning to a much simpler view (I have a view controller that only displays a UITextview and even with that there appears to be about a .4 - .5

How to present a semi-transparent (half-cut) viewcontroller in iOS 8

核能气质少年 提交于 2019-12-05 23:18:59
问题 in iOS 7 there is no problem for this method: _rootViewController.modalPresentationStyle = UIModalPresentationCurrentContext; [_rootViewController presentViewController:self animated:NO completion:nil]; But in iOS 8 it did nothing.How to solve it? Is it a Bug for iOS 8? 回答1: My answer is more simple, below code. This works in iOS8 (XCode6 GM seed). HogeViewController *vc = [[HogeViewController alloc] init]; vc.modalPresentationStyle = UIModalPresentationOverFullScreen; [self

How can I call presentViewController in UIView class?

守給你的承諾、 提交于 2019-12-05 21:44:06
There is a custom tab in in my project that is on every screen of the app, so i made custom UIView class and xib file and added buttons in them. Now i want my buttons for navigations on different screens having different story board ids. But i can't call presentViewController from UIView class. Previously i custom function in extension class to navigate between screens but UIView class also can't call that function. import UIKit @IBDesignable class tab: UIView { var view: UIView! @IBAction func btn1(sender: UIButton) { let storyboard = UIStoryboard(name: "Main", bundle: nil) let vc =

How to dismiss two UIViewControllers in iOS 8?

不羁岁月 提交于 2019-12-05 12:34:14
I am working on iPhone application using Objective C. As I need to dismiss two UIViewControllers at once, so I am using below code : [self.presentingViewController.presentingViewController dismissViewControllerAnimated:YES completion:nil]; This code is working fine in iOS6 and iOS7, but it is not working in iOS8. I have checked by using breakpoint, my ViewController viewDidLoad and viewWillAppear method is calling but my view is not loading at all, so as an output, I am getting blank white screen. Can anyone please help me that for iOS8, how can I solve this problem, should I need to use