It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Please tell me how or what to write so that always causes ViewDidLoad ViewDidUnload?
IOS5 and Storyboard.
Read a similar topic, but did not understand what it takes to do it.
thanks
viewDidLoad will be called whenever a view controller's view object is loaded (either from a nib, storyboard or manually using loadView).
viewDidUnload is not guaranteed to be called, and in fact in iOS6 and onwards, it doesn't even exist. It is only called when a view controller's view is not on the screen, and the system is under memory pressure. You shouldn't have any code in there that you need to call. That should be in dealloc, or viewDidDisappear, depending on what the code does.
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
Learning iOS for first time, but the demo I'm fulling has size and structs enabled, by I'm running the latest iOS and Xcode and don't see that. I have a custom view in my storyboad that takes up the whole view. How do I see/enable size and struts?
If you're talking about "springs and struts", as rdelmar said, just keep AutoLayout set to OFF in your storyboard or XIB files.
like this:
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have a 3 tabs application in my iOS project, all I want is to start a simple UIView before the delegate loads all the TabBarController with the 3 tabs... Just like a "login" page before load the app.
Then, when the user has the permission, the application dismiss the first UIView and show the tab bar views.
How can I do this?
You can have a modal view controller that is instantly triggered by the first tab in your tab bar.
You can use
[self presentViewController:startViewController animated:NO completion:nil];
in for instance viewDidLoad.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
Ok, I'm learning programming for iOS with Stanford's online course on iTunes U (CS193P) but I can't exactly get a hold on how all the stuff from UIView works.
Could someone explain how the following things work cohesively and how I should use them?
CGContextRef
CGContext(if they're not the same thing)
drawRect
awakeFromNib
Thanks in advance!
CGContextRef
is just the reference to
CGContext.
drawRect
makes your view to draw (or redraw) itself at selected rect. Read here.
I never used it by myself, for me it was enough to do all work in viewWillAppear: and viewDidLoad:.
After all outlets and actions are connected, the nib loader sends awakeFromNib to every object in the nib. (c) Read about it here.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
i have a tabbarController application that has 4 tab bar item ,i need in first item to open a viewController only here.
I try whit this
[self presentModalViewController:nvc animated:NO];
work and to come back previous view?
Thank's for any suggest
From your comment, I now think I understand the question, but let me rephrase it to ensure that I am correct:
What you want to know is that if you open a modal viewController using presentModelViewController, how do you close it to get back to the viewController that presented it.
If that's the correct question, here is your answer:
on the viewController that has been presented (the one that is modal), if iOS 5.x call
[self.presentingViewController dismissModalViewControllerAnimated:NO];
if not, call
[self.parentViewController dismissModalViewControllerAnimated:NO];
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm okay to display a label text as soon as a slider value changes, but is there a smarter way ?
UISlider as part of UIKit has no subview of UILabel type.
If you're gonna need a lot of this kind of visual controls you might consider subclassing UISlider.
Otherwise just use seperate UISlider and UILabel.
There are more possible approcahes to this functionality:
You're probably familiar with at least the first one: targeting for valueChanged event.
More elegant approach (dabatable) would be Key-Value Observing.
Key-Value Observing Programming Guide