Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-19-2011, 04:17 PM   #1 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 245
samurle is on a distinguished road
Question UIScrollView with custom paging?

I'm trying to create a UIScrollView with custom paging, however, I'm having an issue with
how the paging decelerates.

Whenever the UIScrollView deceleration routine kicks in, the paging doesn't "decelerate to" my custom paging offset.
Instead, it stops anywhere it wants. Then, I have to tell it where I want the offset to go.
I find this stop-and-go behavior annoying.

Can anyone tell me if this new delegate solves this problem?

Code:
scrollViewWillEndDragging:withVelocity:targetContentOffset:
I'm assuming if I set targetContentOffset to my custom paging offset, then it should fix my
stop-and-go problem.

But, it's only available with iOS 5.0. I'm not a paid developer, so I guess I can't use it?
samurle is offline   Reply With Quote
Old 10-19-2011, 05:18 PM   #2 (permalink)
Just helping out.
 
Domele's Avatar
 
Join Date: Feb 2011
Posts: 2,565
Domele is on a distinguished road
Default

The only reason you need to be paid developer is to test on devices and release your app to the app store. Everything else, you can either buy for a minimal amount (ex. Xcode 4 $5) or get for free.

Everyone (developers) has equal access to the SDK.
__________________
If you are looking for a quality developer, I'm your man. Give me a PM if you are interested.

New app - See screenshots and details at www.globaclock.com.

If you want to thank me, click the link. Every click counts. If you want to do more, buy my app. A link is available on my website. Thanks.
Domele is offline   Reply With Quote
Old 10-19-2011, 05:27 PM   #3 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 245
samurle is on a distinguished road
Default

Quote:
Originally Posted by Domele View Post
The only reason you need to be paid developer is to test on devices and release your app to the app store. Everything else, you can either buy for a minimal amount (ex. Xcode 4 $5) or get for free.

Everyone (developers) has equal access to the SDK.
That doesn't appear to be so:

iOS 5 for Developers - Apple Developer

Quote:
Download iOS 5 SDK
iOS 5 and iOS 5 SDK are available to iOS Developer Program members.
Quote:
You do not have access to this resource based on your membership.
Access to technical resources such as pre-release software and associated documentation, and information related to distributing iOS or Mac apps on the App Store are benefits offered to Apple Developer Program members.
I can't download it without being a paid developer. I can only download XCode 4.1.

I just want to know if this new UIScrollView delegate will solve my problem??
samurle is offline   Reply With Quote
Old 10-19-2011, 05:43 PM   #4 (permalink)
Just helping out.
 
Domele's Avatar
 
Join Date: Feb 2011
Posts: 2,565
Domele is on a distinguished road
Default

I have no idea if it'll solve your problem or not but you CAN download the SDK without paying. Go here, log in (or create an account if you don't have one), and go to downloads. The only difference is that paid developer accounts have access to Xcode for Snow Leopard.
__________________
If you are looking for a quality developer, I'm your man. Give me a PM if you are interested.

New app - See screenshots and details at www.globaclock.com.

If you want to thank me, click the link. Every click counts. If you want to do more, buy my app. A link is available on my website. Thanks.
Domele is offline   Reply With Quote
Old 10-19-2011, 06:14 PM   #5 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 245
samurle is on a distinguished road
Default

Quote:
Originally Posted by Domele View Post
I have no idea if it'll solve your problem or not but you CAN download the SDK without paying. Go here, log in (or create an account if you don't have one), and go to downloads. The only difference is that paid developer accounts have access to Xcode for Snow Leopard.
Ah, thanks, my fault. I didn't know iOS 5.0 was part of XCode 4.2.
I guess I was trying to download XCode5 or something.

Downloading it now.
samurle is offline   Reply With Quote
Old 10-19-2011, 09:19 PM   #6 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 245
samurle is on a distinguished road
Default

Well, I finally got it installed, and...it doesn't work very good.

Adding this delegate kills the deceleration. The scrolling abruptly stops the
moment it hits a paging offset.

And about half the time, it stops halfway, and doesn't even make it.

I'm going back to iOS 4.3.
samurle is offline   Reply With Quote
Old 10-19-2011, 10:09 PM   #7 (permalink)
Just helping out.
 
Domele's Avatar
 
Join Date: Feb 2011
Posts: 2,565
Domele is on a distinguished road
Default

So why don't you just remove the delegate method?
__________________
If you are looking for a quality developer, I'm your man. Give me a PM if you are interested.

New app - See screenshots and details at www.globaclock.com.

If you want to thank me, click the link. Every click counts. If you want to do more, buy my app. A link is available on my website. Thanks.
Domele is offline   Reply With Quote
Old 10-19-2011, 11:03 PM   #8 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 245
samurle is on a distinguished road
Default

Quote:
Originally Posted by Domele View Post
So why don't you just remove the delegate method?
I finally got it working, with the new delegate method!

I was trying to set targetContentOffset with scrollView.contentOffset, which was wrong.

targetContentOffset already contains a valid offset, that was presumably calculated using
the passed velocity. I just needed to adjust targetContentOffset, and it magically decelerates
to the correct offset. No more abrupt stops. Awesome.
samurle is offline   Reply With Quote
Reply

Bookmarks

Tags
custom, decelerate, paging, uiscrollview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 403
15 members and 388 guests
13dario13, 7twenty7, buggen, eski, EvilElf, glenn_sayers, j.b.rajesh@gmail.com, LunarMoon, morterbaher, n00b, QuantumDoja, sacha1996, Sami Gh, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,673
Threads: 94,122
Posts: 402,906
Top Poster: BrianSlick (7,990)
Welcome to our newest member, morterbaher
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:27 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0