Category: image

iphone Flip Image 0

iphone Flip Image

In this tutorial will learn how to flip the image, so to do this will use two Image View and a button i.e. bar button for the flip action, whenever we press flip button...

Add images to bar button item in iphone 0

Add images to bar button item in iphone

UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];[button setImage:[UIImage imageNamed:@"myImage.png"] forState:UIControlStateNormal];[button addTarget:self action:@selector(blah) forControlEvents:UIControlEventTouchUpInside];[button setFrame:CGRectMake(0, 0, 32, 32)];self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button];

Add images to bar button item of toolbar in iphone 0

Add images to bar button item of toolbar in iphone

Set the button type as custom. UIButton *button =  [UIButton buttonWithType:UIButtonTypeCustom];[button setImage:[UIImage imageNamed:@”myImage.png”]  forState:UIControlStateNormal];[button addTarget:self action:@selector(blah)  forControlEvents:UIControlEventTouchUpInside];[button setFrame:CGRectMake(0, 0, 32, 32)];self.navigationItem.rightBarButtonItem =   [[UIBarButtonItem alloc] initWithCustomView:button];