I am getting problem where i am trying to display image exactly in the middle of the screen of
UIView *userView.
userView = [[UIView alloc] initWithFrame:CGRectMake(x, y, KVWDT, KVHGT)];//KVWDT=300 & KVHGT=400.
and my image view is to display only on the upper half of the user view, at bottom i am displaying some other fields also
NSString *imageName = [NSString stringWithFormat:[dic objectForKey:@"img"]];
UIImage *image = [UIImage imageNamed:imageName];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
CGRect imgFrame = imageView.frame;
How should i display the image exactly in the middle of userView. Please help me to solve this problem
use: