uiscrollview

iPhone - removing subviews from UIScrollView - memory-leak

Hi developers, I am currently working on an application which displays several UIViews in a UIScrollView. This UIScroll is inside a UIViewController. (In a loop I am creating new UIViews with autorelease and add them to the scroll view. Could this be the problem?) When I try to release the viewController all the subviews with their l...

How do I center a UIImageView within a full-screen UIScrollView?

In my application, I would like to present the user with a full-screen photo viewer much like the one used in the Photos app. This is just for a single photo and as such should be quite simple. I just want the user to be able to view this one photo with the ability to zoom and pan. I have most of it working. And, if I do not center my U...

What technique should i use to replicate the Compose email view in an iphone App?

So I have an Application that involves sending emails through an API. What I would like is that to have the same or similar to compose email interface available on the phone already. Unfortunately in all apples Goodness there is no view that just does that. [AppleComposeMailViewController alloc]; Would do the trick nicely...

Captured which subview is touched in UiScrollView but cannot access it in another function.

I have UIScrollView which has subviews (pictures) added do it. each time a user touches the a picture in the scrollview, it toggles a checkmark ontop of it. NSMutableIndexSet *picturesArray; <- declared in .h (void) touchesEnded: (NSSet *) touches withEvent: (UIEvent *) event { if (!self.dragging) { [self.nextResponder touchesEnded: ...

Are there any good UIScrollView Tutorials on the net?

Any good links are highly appreciated! This goes to community wiki. ...

How would you implement an scrollable grid in your iPhone app?

I have about 50 images of 50 x 50 pixel size each. I want the user to pick one of them. So first I thought about an UITableView, but that's just not the right thing. It wastes a lot of screen space. Rather than putting all images one below the other, it would be better to show a grid of lets say 6 columns and n rows. I would use an UISc...

Is there a way to hide the scroll indicators in an UIScrollView?

I've got an use case where those indicators disturb the user interaction. Can I subclass and overide an method or something similar to remove the scoll indicators from the scroll view? ...

UIScrollView: How would I recycle objects in my scrollable grid when the user scrolls?

I've got an UIScrollView with a grid of images. Currently they're only 6, but there might be a few hundred some day. So of course it would be a bad idea to create a few hundred UIImageView objects inside that UIScrollView and fill them all up with image data. I think I was reading this somewhere in the Apple docs: They recommend to only...

How can I set the paging behavior of an UIScrollView with pagingEnabled=YES?

The documentation says: If the value of the property is YES, the scroll view stops on multiples of the view bounds when the user scrolls. The default value is NO. well it's really nice that it stops on multiples of the view bounds when the user scrolls ;) But how many multiples? how's that beeing calculated? I get a really w...

How can I invoke a method upon scrolling-events in a UIScrollView?

I've got an UIScrollView object where I want to implement some effects happening when the user is scrolling. Is there a way to invoke a method on my view controller class every time the user starts a scroll action or is scrolling? What I need is also the current scrolling position. I am almost sure that there is something useful availab...

How can I set the scrolling position of an UIScrollView?

I've seen the setContentOffset:animated: method. Is that going to scroll to a specific position, or what does that "offset" mean? ...

Why does my -scrollViewWillBeginDragging method of my UIScrollView delegate return such a strange contentOffset value?

PROBLEM SOLVED! STUPID TYPO IN MY CODE! That's my method of my UIScrollView delegate: - (void)scrollViewWillBeginDragging:(UIScrollView *)activeScrollView { NSLog(@"contentOffset: %f", activeScrollView.contentOffset); } Output in console is like: 2009-05-06 23:04:45.731 Demo[4851:20b] contentOffset: 21080643979530096233938944.00...

How would you implement the recycling of views during scrolling in an UIScrollView?

Well, there is the delegate that will get called when: the scroll view beginns scrolling the finger liftet of from the scroll view after initializing a scroll-movement the scroll view stopped decelerating but now the problem is, if you want to recycle those View's upon scrolling, you must do that very quickly during scrolling. Someth...

How would you implement a dataSource object for an UIScrollView?

Tell me if I am wrong with that: I made an new class ScrollViewDataSource. That class conforms to an protocol I created within my delegate for the scroll view. Well, it's a very special delegate that does some very complex stuff upon scrolling. So this delegate receives that data source object upon initialization. The datasource object ...

Do I have to run the delegate of an UIScrollView in another thread to prevent performance problems during scrolling?

I'm going to do some sophisticated things in the delegate's methods during scrolling. I'll also implement the dynamic preloading of contents, so that it's theoretically possible to scroll through a few hundret thousand images. But I fear, that every time I do the preloading action for the next big chunk in scrolling direction, the delega...

Photos app-like gap between pages in UIScrollView with pagingEnabled

UIScrollView in paging mode assumes the pages are located right next to each other, with no gap. However if you open a photo in the Photos app and swipe through photos, you can see that it has some gap between pages. I want these gaps too. I'm looking for existing solutions if any, or for some more bizarre ideas about implementing the p...

How do I enable directional lock for a UIScrollView?

I have a UIScrollView with a UIView inside. I want to lock the x-axis so that the view is only scrolled vertically. How do I enable directional locking? ...

Getting the visible rect of an UIScrollView's content

How can I go about finding out the rect (CGRect) of the content of a displayed view that is actually visible on screen. myScrollView.bounds The code above works when there's no zooming, but as soon as you allow zooming, it breaks at zoom scales other than 1. To clarify, I want a CGRect that contains the visible area of the scroll vie...

Fade in/out UIScrollView's content like Mobile Safari does in its tab

NOTE: I added my new solution at the UPDATE answer below. I try to recreate the effects we saw in Mobile Safari's tab on iPhone/iPod touch. Basically, it's a UIScrollView that holds 4 reusable UIView (acting like ring buffer), and scrolls horizontally. When scrolling, the UIView's opacity will fade in/out seamlessly with offset. Curr...

UIScrollView touches vs subview touches

Please can someone help sort a noob out? I've posted this problem on various forums and received no answers, while many searches for other answers have turned up stackOverflow, so I'm hoping this is the place. I've got a BeachView.h (subclass of UIScrollView, picture of a sandy beach) covered with a random number of Stone.h (subclass o...