I am trying to place text view on image view of particular size, but when i load the image from photo gallery my text view get over written and I am not able to write upon it . I guess, when I create a rectangle frame for bi then image from gallery get override to text view. what should I do?
answer: this is working ocde:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { // set image emailImage1 = [info objectForKey:UIImagePickerControllerOriginalImage]; //bi.image = [info objectForKey:UIImagePickerControllerOriginalImage]; image = [info objectForKey:UIImagePickerControllerOriginalImage]; bi = [[UIImageView alloc ] initWithImage: image ]; bi.frame = CGRectMake(20.0f, 100.0f,260.0f, 285.0f); [self.view addSubview: bi]; [self.view bringSubviewToFront:scroll]; [[picker parentViewController] dismissModalViewControllerAnimated:YES]; [picker release]; } - (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker { // release picker [[picker parentViewController] dismissModalViewControllerAnimated:YES]; [picker release]; }
help plz