uiscrollview

iOS - Button tap animation in UIScrollView

夙愿已清 提交于 2020-01-14 06:05:30
问题 So I have a main view that is a UIScrollView, and I add all of my elements (UIButtons, UITextFields, UILabels etc. etc.) to it. The problem I am having, is that when I go to tap a button, the button will perform the action(s) that it is supposed to, however I will not see the pressed animation occur. I can only see the animation if I press and hold for about half a second. I believe this has something to do with the fact that the UIScrollView seems to think I am trying to scroll at first, but

Recreating Instagram longpress peek?

邮差的信 提交于 2020-01-14 02:58:11
问题 I'm looking to recreate the functionality that's show in this video for the picture: https://www.youtube.com/watch?v=zEREoIcoQHE A long press is done, a view appears, and when the user swipes up far enough, the options come up at the bottom. If the user continues to drag up higher and then lets go, the main view animates to bounce back down to the middle of the screen. If the user swipes all the way down, the view animates away. I recognize there is a lot going on here and a lot of different

Memory usage of MKMapView is very high

依然范特西╮ 提交于 2020-01-13 19:43:51
问题 So i have a UIScrollView with UIPageControl which has a bunch of MKMapViews (mostly 15 different maps). The app is really sluggish once this view loads and after a few minutes of usage i get a memory warning. I looked at it in Instruments and the maps take an insanely high chunk of memory. Even upto ~200mb sometimes. One thing i can think of is to reuse the mapViews. But because of how the views are structured the coding complexity increases. Any suggestions how i can improve performance?

UIScrollView not respecting minimumZoomScale after changing the subview

那年仲夏 提交于 2020-01-13 11:55:11
问题 I'm hitting a problem getting a UIScrollView to update correctly in response to a change in the minimum zoom scale. The scrollview has a UIImageView as a subview, and the image property of the UIImageView is set in response to the didFinishPickingMediaWithInfo method of UIPickerView: - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { UIImage *takenImage = [info objectForKey:UIImagePickerControllerOriginalImage]; [self.imageView

Set UIPopOverController size

拜拜、爱过 提交于 2020-01-13 10:43:34
问题 I have a view with a bunch of button in a UIScrollView . When the user presses a button, I want a UIPopOverController to display pointing at the selected button. It kind of works, but the popover is the wrong size and points to a random point in the view. Here is my code. -(void)detail:(id)sender{ UIButton *button = sender; NSLog(@"tag = %i", button.tag); UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController]; if (UI_USER_INTERFACE

Set UIPopOverController size

时间秒杀一切 提交于 2020-01-13 10:43:16
问题 I have a view with a bunch of button in a UIScrollView . When the user presses a button, I want a UIPopOverController to display pointing at the selected button. It kind of works, but the popover is the wrong size and points to a random point in the view. Here is my code. -(void)detail:(id)sender{ UIButton *button = sender; NSLog(@"tag = %i", button.tag); UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController]; if (UI_USER_INTERFACE

How do I properly observe the contentOffset property of my scrollView subclass?

大城市里の小女人 提交于 2020-01-13 09:21:14
问题 In my iOS app I am observing changes to the contentOffset property of my scrollView subclass. My observer handler looks like this: - (void)observeContentOffsetHandler:(id)aContentOffset { NSLog(@"%@", aContentOffset); } I chose the parameter to the method arbitrarily as an id for simplicity. My NSLog'ging looks like this: -[MyScrollView observeContentOffsetHandler:] [Line 111] NSPoint: {296, 375} -[MyScrollView observeContentOffsetHandler:] [Line 111] NSPoint: {296, 389} -[MyScrollView

UIgestureRecognizer in a view inside a UIScrollView

巧了我就是萌 提交于 2020-01-13 09:04:09
问题 Has anyone managed to get a UIGestureRecognizer to work on a UIView that is a subview of a UIScrollView? My callbacks never seems to get called. As a simple example, I want to have a paging scrollview and on the third page listen for a tap with a UITapGestureRecognizer. However I can not get it to work. Here's how I would do it: self.scrollView = [[[UIScrollView alloc] initWithFrame:self.view.frame] autorelease]; self.scrollView.pagingEnabled = YES; self.scrollView.contentSize = CGSizeMake

Curving/warping views with CoreAnimation or OpenGL for carousel effect

独自空忆成欢 提交于 2020-01-13 08:37:28
问题 Right now I'm populating a UIScrollView with a series of views. The views need to be warped to make the UIScrollView appear like a carousel. In other words when the user scrolls it needs to be like a circle. I've never done anything quite like this before, but I'm assuming CoreAnimation is out of the question and OpenGL needs to be used. If this is possible with CoreAnimation or Quartz then I really just need a sample on how to warp the views and I can figure the rest out myself but I'm not

Swiping Images with Page Control in Iphone (Part 2)

我怕爱的太早我们不能终老 提交于 2020-01-13 06:43:11
问题 I am trying to make practice app where i can scroll images with page control. I am able to scroll images and able to include the page control. But the problem i face is i am not able to interlink the two. Meaning to say when I scroll the images, the page control is not affected and when i change the page control, the scrolling of the images is unaffected. I am referring to this website: http://www.raywenderlich.com/10518/how-to-use-uiscrollview-to-scroll-and-zoom-content ViewController.h