[Solved] Exception in button tag

The reason you are getting an exception is because your tag is greater then the blogids count. Add the buttons to the array and then it will not crash. For example: blogids = [[NSMutableArray alloc]init]; [blogids addObject:oneOfYourButtons]; Also if you only want to see the tags number use this: NSLog(@”The tag clicked:%d”,tag); instead of: NSLog(@”The … Read more

[Solved] Creating properties in iOS [closed]

All properties are created manually using the @property declaration. In the latest objective-C you don’t need to add the @synthesize declaration any more. As for IBOutlets, they don’t do anything. In fact, IBOutlets are expanded to nothing. They are just passive tags so that Interface Builder can locate the properties that it can associate objects … Read more

[Solved] Delete all rows in a tableview [duplicate]

On the button action event remove all the objects from itemArray then reload tableView data. Before this make sure that in tableView delegate numberOfRowInsection you are passing itemArray count like that: – (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [itemArray count]; } // button action// -(IBAction)deleteTableViewData { [itemArray removeAllObjects]; [tableView reloadData]; } 3 solved Delete all rows … Read more

[Solved] How to convert an NSString to id or UIView objective-c iphone [closed]

This gets you a UIViewController loaded from a xib. Class vcClass = NSClassFromString (@”myUIView”); UIViewController *detailViewController = [[vcClass alloc] initWithNibName:@”myUIView” bundle:nil]; If you just wanted a UIView object, just do: UIView* myView = [[vcClass alloc] init]; But really, as the three answers so far show it isn’t clear at all what you what. Can you … Read more

[Solved] How to call take picture method in IOS [closed]

You’ll want to take a look at the UIImagePickerController class which is what lets you access the camera functions of your iOS device. Specifically, you’ll want to use the source type UIImagePickerControllerSourceTypeCamera (first checking if the device has a camera via isSourceTypeAvailable:), with media type kUTTypeImage, present the camera controller via presentViewController, and you can … Read more

[Solved] Fetch Image from URL

just i did getting image and display in navigation bar. Its working code. NSURL *urlNav = [NSURL URLWithString:@”https://www.google.co.in/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png”]; NSData *urlData = [NSData dataWithContentsOfURL:urlNav]; UIImage *imageNav = [UIImage imageWithData:urlData]; UINavigationController *navController=[[UINavigationController alloc]initWithRootViewController:NextView]; //navController.navigationBarHidden=YES; [self.navigationController.navigationBar setBackgroundImage:imageNav forBarMetrics:UIBarMetricsDefault]; 0 solved Fetch Image from URL