Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
What is the best way of displaying an information page in an iphone app? Anny ideas will be very helpful. I would prefer to keep all info within iphone app so as not to make it internet connectivity dependant..
Set up a "home" view controller as the root view controller of a navigation controller.
From here, set up a button or tab to trigger pushing an "information" view controller onto the navigation stack.
In the "information" view controller, use a UITableView to organize sections and table cells that drill down to further details.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 months ago.
Improve this question
Hiii !
it's my second app on Xcode.
I noticed that my navigation item is not a button but a "drop down" and I don't know why
How can I change it ? Image: navigation item
So from the comment, I will answer detail about your problem for futher reader and yourself.
As Swift there is two types of tranfering to from view controller to another view controller
First one is using presentViewController which is presents a view controller modally. Just like from your image and we usually use it for task you don't want user to navigate from so just two methods cancel or continue. Example: Sign In, Sign Up, ...
Second one is using pushViewController which will have a Back button just like you want in the navigation bar. And in this case you can control your own controller, callback, ... Remember to define what is root view controller by using Embed in Navigation controller if you use storyboard or define by code by using
UIApplication.shared.windows.first?.rootViewController = vc // your view controller
What you're dealing with is that your storyboard or screen is as a sheet.
Segue set as Page Sheet
Changing this to full screen will give it a bar, but you may need to embed the scene into a navigation control to create a bar. You can do that via Editor -> Embed In -> Navigation Controller.
Segue set to full screen
Embedded into Navigation Controller
The navigation controller color is set to black to be noticeable.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have two screens which have half of the content same. I need to navigate from one view controller to another. Do I need to create both screen's content separately or there is an another way.
I hope I am clear with my question!
Create your own UIView subclass an implement all filter ui there. Then use Your FilterView in both Controllers.
Example
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am trying to experiment with Tab Views in swift. I've created a tab in the StoryBoard and linked it up correctly. I also set up the file by selecting the Cocoa Touch Class and the UIViewController option. My question is how do I link the file with the view so that it works like how the others do?
Go to the storyboard and select the Tab view controller on your storyboard. In the identity inspector set the class to Your ViewController class.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have one picker view on screen 1 once i select component from picker view. selected item display on screen 2 navigation bar title. How can we achieve pleas help me.
Array[abc,xyz,cde,ope];
Thanks
You need to pass the selected value to the next view controller and set the selected values as a navigation bar title.
Create a NSString Instance in view controller 2
viewcontroller2.h
#property(nonatomic,retain)NSString *title;
In view controller 1 before navigate to viewcontroller2 you need to set the selected view to the viewcontroller 2 title instance (one kind of sending value to next view)
Viewcontroller1 :
ViewController1 *view1 = [[ViewController1 alloc] init];
view1.title = pickerSelectedString;
[self.navigationController pushViewController:view1];
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
hi i am new to iphone. what i did is creating two classes named view1 view2. And i create a button in view1. now what i need is when ever i click the button in view one it goes to viewdidload in view2 how can i done this pls post some code or link. thank u
You're violating principals of MVC. Views should never talk directly to one another. If you need to signal some change in one view upon some event from another view, you need to route it through your controller.
I.e., a push of a button might change a label. In this case, the button receives an event (touches up or whatever) which get routed through its delegate (some controller). This delegate can then signal some action which then changes the text of the label (the second view).
I strongly suggest you become acquainted with the model-view-controller paradigm. It will give you insight into how the frameworks are constructed, and enable you to better write code targeting these frameworks.