Advertisement
Guest User

trying to assign "name" which is the textInput to arg1.

a guest
Aug 8th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #import <SpringBoard/SpringBoard.h>
  2. #import <CoreTelephony/CTCarrier.h>
  3.  
  4. NSString *name;
  5.  
  6. -(void)applicationDidFinishLaunching:(id)application {
  7.  
  8. UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Welcome"
  9. message:@"Enter Carrier Name"
  10. delegate:self
  11. cancelButtonTitle:@"Cancel"
  12. otherButtonTitles:nil];
  13. alert.alertViewStyle = UIAlertViewStylePlainTextInput;
  14. [alert show];
  15. }
  16.  
  17. - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
  18. if (buttonIndex == 1) {
  19. name = [alertView textFieldAtIndex:0].text;
  20. }
  21. }
  22.  
  23. - (void)setCarrierName:(id)arg1{
  24. arg1 = [self name];
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement