uiviewcontroller

Passing data from one viewcontroller to another

坚强是说给别人听的谎言 提交于 2020-01-14 06:54:33
问题 I subclassed two view controllers. The first one is supposed to pass data, a NSUrl object to the second one. .m of the first one: NSURL *temp = [NSURL URLWithString:@"http://example.com"]; UIViewController *presentationsFullScreen_ViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"PresentationsFullScreen_ViewController"]; presentationsFullScreen_ViewController.urlToUse = temp; .h of the second one: #import <UIKit/UIKit.h> @interface PresentationsFullScreen

Objective-C - Delay open view iOS 7.1

不打扰是莪最后的温柔 提交于 2020-01-14 03:30:27
问题 I have a map with markers (GoogleMaps framework 1.8.1 - iPhone 4S - iOS 7.1). Every time I click on a marker I need to show to another screen. The problem is that it has a delay 2-3 seconds on any screen that is connected to this view with map. In some instances the delay reaches 20 to 30 seconds. Code creation map: camera = [GMSCameraPosition cameraWithLatitude: locationManager.location.coordinate.latitude longitude: locationManager.location.coordinate.longitude zoom: 14]; map = [GMSMapView

Navigation Bar Changes Height

安稳与你 提交于 2020-01-14 03:23:38
问题 When I push my UIViewController to the screen from my previous controller it animates the change. But when it finishes loading it resizes my navigation bar and the jumpy transition makes it look bad. How can I fix this? All I'm doing is hiding the navigation bar in Controller A in viewWillAppear and showing it in Controller B in viewDidLoad . 回答1: Ok solved it. In viewDidLoad of Controller B (the view controller I'm pushing) add the following: UINavigationBar *navigationBar = self

How to setup a partial curl modal not hiding toolbar?

♀尐吖头ヾ 提交于 2020-01-13 20:20:07
问题 In the Google Maps app on iPhone, the toolbar in the buttom is still visible after the modal with a partial curl transition is preformed. When I setup a modal seque in my storyboard with a partial curl, the new view controller is hiding the toolbar from the parant view. How can I setup a partial curl like the Google Maps app? 回答1: You'll probably need to go with OpenGL ES for this one. Core Animation exposes the ability to work with layers, even in 3-D, but all layers are just rectangles and

Instantiate UIViewController programmatically without nib

邮差的信 提交于 2020-01-13 09:25:07
问题 I want to create a UIViewController programmatically without the use of a nib or a storyboard. I thought it would be enough to implement the UIViewController as: class TestViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() //Add some setup code here, without it it should just be blank } } instantiate it with let vc = TestViewController(nibName: nil, bundle: nil) or just TestViewController() and then just push it: navigationController?.pushViewController(vc,

Swift Sprite Kit In App Purchase

ぃ、小莉子 提交于 2020-01-13 07:16:18
问题 I have a button in an SKScene (using Swift) -- "Add Puzzles" When the user clicks this button, I want to go to a UIView Controller or UI Scene so that I can implement In App Purchase code... (SkScenes are subsets of UIViews and cannot run the code...) Does anyone have a basic idea how to do this... I am a little inexperienced at this... I have used cocos2d and now Sprite Kit and have always set everything up manually and have very little experience with .xib files and view Controllers... Does

Why isn't my UIButton responding to touches?

丶灬走出姿态 提交于 2020-01-13 04:49:29
问题 I'm sure I'm overlooking the obvious as I've got countless working buttons...but...for whatever reason this one is not cooperating... I've added a UIButton (Rounded Rect) to a UIView subclass (DialogView) which is a subview of my view controller's view. This subview is created almost entirely in IB. I've wired up the button to (IBAction)okButtonPressed:(id)sender in IB to Touch Up Inside and created a corresponding method in DialogView. However when I "touch" this button it doesn't trigger

Why isn't my UIButton responding to touches?

为君一笑 提交于 2020-01-13 04:48:13
问题 I'm sure I'm overlooking the obvious as I've got countless working buttons...but...for whatever reason this one is not cooperating... I've added a UIButton (Rounded Rect) to a UIView subclass (DialogView) which is a subview of my view controller's view. This subview is created almost entirely in IB. I've wired up the button to (IBAction)okButtonPressed:(id)sender in IB to Touch Up Inside and created a corresponding method in DialogView. However when I "touch" this button it doesn't trigger

Phonegap/Cordova with Multiple CDVViewController

谁说胖子不能爱 提交于 2020-01-13 03:57:26
问题 my Idea is to use Phonegap for the business logic of my app, but use native transitions. So I need CDVWebView in every UIViewController. This works fine with normal UIWebviews, but if I use multiple CDVViewControllers for e.g. a TabBar, the deviceReady event only fires for the first CDVWebView. Here is what I do in the App Delegate: - (BOOL) application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { NSURL* url = [launchOptions objectForKey

Allow autorotation on just one view controller

痴心易碎 提交于 2020-01-13 03:16:26
问题 In my project I have allowed only portrait rotation, but for one ViewController I would like to enable also landscape. I'm presenting this ViewController as ModalViewController , I've tried using methods - (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation or iOS 6 methods like -(NSUInteger) supportedInterfaceOrientations but nothing actually worked. The view didn't rotate although those methods got called. After this I've tried to rotate it by myslef