Related questions
iOS - adding/removing a subview programmatically
Ok I want to add a UIImageView as a subview and then remove it after a couple of seconds in the way a splash screen works. I found three different approaches to do it but I can not understand which …
UITapGestureRecognizer not working in UIImageView
I had the following code:
UITapGestureRecognizer *showStoryTapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showNewsStory:)];
[showStoryTapRecognizer setDelegate:self];
[self.storyImageView_ addGestureRecognizer:showStoryTapRecognizer];
[showStoryTapRecognizer release];
This however doesn't trigger the showNewsStory, why is this? I have enabled userInteraction in the image view.
Get width of a resized image after UIViewContentModeScaleAspectFit
I have my UIImageView and I put an image into it that I resize like this:
UIImageView *attachmentImageNew = [[UIImageView alloc] initWithFrame:CGRectMake(5.5, 6.5, 245, 134)];
attachmentImageNew.image = actualImage;
attachmentImageNew.backgroundColor = [UIColor redColor];
attachmentImageNew.contentMode = UIViewContentModeScaleAspectFit;
I tried getting the width of the resized …