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 07-08-2010, 02:03 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 30
anurekhadevi is on a distinguished road
Default To add pages only in left direction in uiscrollView

Hai,

I am using a uiscrollview in which i'm adding pages dynamically.What i want is ,the scrolling should be done initially only in left direction instead of what it does generally.

Plz help with sample code.
anurekhadevi is offline   Reply With Quote
Old 07-08-2010, 02:15 AM   #2 (permalink)
Senior Member
 
Join Date: Feb 2010
Location: dallas
Posts: 219
gud4nuthin is on a distinguished road
Default

cell.text=nil;//aBook.description;


labelb.font = [UIFont systemFontOfSize:14.0];
//[labelb setFont:[UIFont boldSystemFontOfSize:[UIFont smallSystemFontSize]]];

labelb.textAlignment = UITextAlignmentLeft;
//labelb.lineBreakMode = UILineBreakModeWordWrap;
labelb.numberOfLines = 15;


labelb.backgroundColor = [UIColor redColor];

labelb.text = [NSString stringWithFormat:@"%@", aBook.desc];

//labelb.autoresizingMask = UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleHeight;
[cell.contentView addSubview:labelb];
gud4nuthin is offline   Reply With Quote
Old 07-08-2010, 02:16 AM   #3 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

Quote:
Originally Posted by anurekhadevi View Post
Hai,

I am using a uiscrollview in which i'm adding pages dynamically.What i want is ,the scrolling should be done initially only in left direction instead of what it does generally.

Plz help with sample code.
I not undestand, the first time scroll can be done only on the left.


However you can subclass uiscrollview and on touch events you can intercepts left swipe and cancel it.
__________________
dany_dev is offline   Reply With Quote
Old 07-08-2010, 02:28 AM   #4 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 30
anurekhadevi is on a distinguished road
Default

What i am saying is initially when we start scrolling the page should not be loaded on right side. it should be done in left. If you have idea plz give some sample code for this.
anurekhadevi is offline   Reply With Quote
Old 07-08-2010, 02:32 AM   #5 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

Quote:
Originally Posted by anurekhadevi View Post
What i am saying is initially when we start scrolling the page should not be loaded on right side. it should be done in left. If you have idea plz give some sample code for this.
so you want that the scroll is from the right to left?.

if so, you can load all images and then setContentOffset at the end of your scrollview, so the user can scroll images from right to left.

If it is not what you want. Please write more than 1 line to explain it.
__________________
dany_dev is offline   Reply With Quote
Old 07-08-2010, 03:44 AM   #6 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 30
anurekhadevi is on a distinguished road
Default

Quote:
Originally Posted by dany88 View Post
so you want that the scroll is from the right to left?.

if so, you can load all images and then setContentOffset at the end of your scrollview, so the user can scroll images from right to left.

If it is not what you want. Please write more than 1 line to explain it.
First of all i'm not using images.I set uiscrollview to screen frame size. I am adding viewcontroller lazily on scrolling. When scrolling starts usually pages swift from right to left.and viewcontroller gets added dynamically.
What i want is on scrolling from right to left the viewcontroller is added but for me on scrolling from left to right the pages should be added.
I think now you are clear. Plz help with code
anurekhadevi is offline   Reply With Quote
Reply

Bookmarks

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: 345
14 members and 331 guests
akacaj, c2matrix, cgokey, esoteric, EXOPTENDAELAX, GHuebner, givensur, HemiMG, Mirotion22, mjnafjke, Pudding, SLIC, Sloshmonster, Sonuye857
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,652
Threads: 94,115
Posts: 402,887
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Sonuye857
Powered by vBadvanced CMPS v3.1.0

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