Conclusion get you a good book or videos to learn from the beginning. Some resources to do so.
Up vote -1 down vote favorite share g+ share fb share tw.
I needed a button that causes a UIAlertView with actions to pop up. Once the Alert pops up it needs to have 1 button to cancel and stay on the same page and 1 button that links you to another ViewController. This is what I pieced together from some forums but I have no idea what I'm doing and it gives me about 9 error messages.
Please Help! -(IBAction)Alert:(id)sender { UIAlertView *Alert = UIAlertView alloc initWithTitle:@"Alert" message:@"Warning! By entering the Tutorial, all data will be lost.
Are you sure you want to continue? " delegate:self cancelButtonTitle:@"Return to Data Collection" otherButtonTitles:@"Continue", nil; Alert Show; Alert Release; } - (void)Alert:(UIAlertView *)Alert clickedButtonAtIndex:(NSInteger)buttonIndex { if(Alert. Tag==0) { if(buttonIndex == 1)//OK button pressed { Tutorial *Info = Tutorial alloc initWithNibName:nil bundle:nil; self presentModalViewController:Info animated:YES; } The first box of code works so that when I press a button on my home screen an alert with 2 buttons pops up.
However, I can't get the second button to link me to the next ViewController. Objective-c ios cocoa-touch uiviewcontroller uialertview link|improve this question edited Jan 25 at 3:56vikingosegundo10.8k51234 asked Jan 25 at 1:57user11683061.
Objective-C is case-sensitive. Alert show; Alert release; and - (void)alertView:(UIAlertView *)Alert clickedButtonAtIndex:(NSInteger)buttonIndex (How do you think, it can work, if you rename the methods? ) remove if(Alert.
Tag==0) { Why are you not passing a name for a nib-file here: Tutorial *Info = Tutorial alloc initWithNibName:nil bundle:nil; Please stick to coding conventions. Objects are named in camelCase. Conclusion get you a good book or videos to learn from the beginning.
Some resources to do so.
1 for coding conventions – Rickay Jan 25 at 4:01 Passing nil for nibName is fine - it just loads a nib whose name matches the class name - Tutorial. Xib in this case. Of course if the nib isn't called that then you'd have a problem.
– Nick Lockwood Jan 25 at 8:26.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.