uinavigationcontroller

How to add Button in UINavigationController

戏子无情 提交于 2019-12-25 01:24:58
问题 navigator=[[UINavigationController alloc]initWithRootViewController:contacts]; UIBarButtonItem *nextButton = [[UIBarButtonItem alloc] initWithTitle:@"Delete" style:UIBarButtonItemStyleBordered target:self action:@selector(makeCall)]; //[[self.navigator navigationItem] setLeftBarButtonItem:nextButton]; self.navigator.navigationBar.items=[NSArray arrayWithObject:nextButton]; I am adding a button to UINavigationController and got following exception please help me 2011-01-03 11:46:26.626

How to access one UIViewControllers properties from another UIViewController?

爷,独闯天下 提交于 2019-12-25 00:33:25
问题 I have one single MainViewController which has of course it's one main UIView. I have this main view comprised of many different subviews. Some of these subviews have their very own ViewController. Lets say the MAIN view (whose delegate is primarily MainViewController) has a container which loads another UIView that uses a separate UIViewController- SecondaryViewController as the delegate for most it's actions. This container view is of course loaded in MainViewController via

Tap on UICollectionViewCell does not transition

女生的网名这么多〃 提交于 2019-12-25 00:29:49
问题 I do not use the storyboard. I write it with code only. I would like to know how to tap collectionviewcell to make a transition. Overlap of view of project is as follows. /*Color of each view VC (green) baseTableV (red) UItableViewCell ↓ HogeUIView (gray) tableV (blue) UItableViewCell ↓ orangeView(orange) baseColle (purple) Page0Cell (yellow) ↓ tableV (gray) UItableViewCell //I want to tap this cell to make a transition. But I can not. */ I will ask about that can not be transitioned by

Navigation Controller Error

≡放荡痞女 提交于 2019-12-25 00:23:06
问题 I have a navigation controller and I want the title to have a custom font. I have tried to do this but when it runs I get Thread 1: EXC_BAD_INSTRUCTION (code=EXC_1386_INVOP.subcode=0x0) Here is my code. import UIKit class PriceCheckSpreadsheetViewController: UIViewController { @IBOutlet weak var SpreadsheetView: UIWebView! @IBOutlet weak var Loading: UIActivityIndicatorView! @IBOutlet weak var BackButton: UIBarButtonItem! @IBOutlet weak var ForwardButton: UIBarButtonItem! @IBOutlet weak var

How to remedy a UINavigationBar overlapping the top of my UIScrollView?

こ雲淡風輕ζ 提交于 2019-12-24 23:26:59
问题 I am working with a TabBarController >> NavBarController UI. One of my UIViewControllers has a UIScrollView in it with some text (UITextField) in it. Problem is, the uppermost text in the UIScrollView is covered by the NavBar. How do I fix this? I am trying to manually adjust stuff in IB with mixed results but I want a more CERTAIN solution. 回答1: The problem is that your view is too big, and it's being positioned under the nav bar. To fix, open up the .xib with your container view and/or your

AVCaptureDevice.requestAccess presents unexpected behavior with a UINavigationController

无人久伴 提交于 2019-12-24 23:03:57
问题 Working with Xcode 10.1 and Swift 4.2 I have a complex app that uses a UINavigationController implemented in the AppDelegate . The rootViewController of the navigationController is a DashboardController() class (subclass of UIViewController ) The DashboardController implements a left menu drawer using several ViewControllers (with self.addChild(viewController) ) Everything works fine, except when I need to push a viewController to present a BarCodeScannerView(). The barebone

iPhone app crashes if view is swapped during data download

人盡茶涼 提交于 2019-12-24 22:24:57
问题 I have an iphone app that when the user clicks a row in a uitable, it takes the row value and downloads some data from the web to populate the next view. However if the user switches back to the first view when the data is being downloaded the app crashes. I think i've found the problem but need some help fixing it: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSManagedObject *selectedObject = [[self fetchedResultsController] objectAtIndexPath

UINavigationController not popping view on back button

强颜欢笑 提交于 2019-12-24 21:59:33
问题 I have a UINavigationController. I've got a UIViewController that I've pushed onto the stack using pushViewController. The previous view controller has a backBarButtonItem simply titled "Cancel." While the new view animates in correctly, when I tap Cancel, the navigation bar animates as if the view was popped, but the new view doesn't go away. Do I need to implement a delegate somewhere? 回答1: Try this, First Create a UIButton then Create one UIBarButtonItem with Custom view, considering

Navigation stack will not be updated, segue from GMSAutocompleteResultsViewController

守給你的承諾、 提交于 2019-12-24 20:44:55
问题 I'm having issue with segue to the existing UIViewcontroller via the pushViewController. When I'm tap on the place in resultsViewController, I expect the segue to the MainVC, but i have an error: pushViewController:animated: called on while an existing transition or presentation is occurring; the navigation stack will not be updated. How can I fix this, and have the transition to MainVC?? 回答1: Couple things: Make sure you are not "doubling up" on navigation. If you use a Segue to transition

Flutter - Change back button from Navigation Bar

这一生的挚爱 提交于 2019-12-24 18:52:36
问题 Good day, I need to change the command from back button located on Navigation Bar on Android cellphones, like the imagem bellow? I need to change the button to appear a message, "Do you really want to quit the application?" .To confirm the user leave the program. Anyone can help? Thanks. 回答1: Use the WillPopScope widget to handle the back button action, example : class TestingWidget extends StatefulWidget { @override TestingWidgetState createState() { return new TestingWidgetState(); } }