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 04-14-2011, 03:02 PM   #1 (permalink)
learner2011
 
Join Date: Mar 2011
Posts: 115
ashwinr87 is on a distinguished road
Default zooming animation problem in ScrollView - Ipad

Hi,

In my app, I have a split screen in which the detail view is a scrollview. I have 5 tables which are subviews of my scrollview in which 3 table views are side by side on top and 2 table views are side by side on bottom

I have already implemented a way in which when I click any of the rows of any of the table in the scrollview, that view disappears and another view zooms into its position.

I write the following code in the didSelectRowAtIndexPath in the middle table subview,

Code:
CGFloat xpos = self.view.frame.origin.x;
    CGFloat ypos = self.view.frame.origin.y;
    self.view.frame = CGRectMake(xpos+100,ypos+150,5,5);
    [UIView beginAnimations:@"Zoom" context:NULL];
    [UIView setAnimationDuration:2];
    self.view.frame = CGRectMake(xpos,ypos,220,310);
    [UIView commitAnimations];
    [self.view addSubview:popContents.view];
popContents is the view I need to zoom into to the view previously occupied by that particular table view and that happens correctly.

However the problem that I am facing is that since there is another table subview in the side, if I increase the frame size to say 250 or so, the part of the zoomed in view gets hidden by the tableview on the side ( as its as if a part of the zoomed in view goes under the tableview on the side).

Is there anyway to correct this so that my zoomed in view would not get hidden by the tableviews on its sides?

I hope I have explained my problem correctly...
ashwinr87 is offline   Reply With Quote
Old 04-14-2011, 06:10 PM   #2 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 551
aldcorn@live.com is on a distinguished road
Default z index?

there is a z index for all you views, This set their layer order.


Quote:
Originally Posted by ashwinr87 View Post
Hi,

In my app, I have a split screen in which the detail view is a scrollview. I have 5 tables which are subviews of my scrollview in which 3 table views are side by side on top and 2 table views are side by side on bottom

I have already implemented a way in which when I click any of the rows of any of the table in the scrollview, that view disappears and another view zooms into its position.

I write the following code in the didSelectRowAtIndexPath in the middle table subview,

Code:
CGFloat xpos = self.view.frame.origin.x;
    CGFloat ypos = self.view.frame.origin.y;
    self.view.frame = CGRectMake(xpos+100,ypos+150,5,5);
    [UIView beginAnimations:@"Zoom" context:NULL];
    [UIView setAnimationDuration:2];
    self.view.frame = CGRectMake(xpos,ypos,220,310);
    [UIView commitAnimations];
    [self.view addSubview:popContents.view];
popContents is the view I need to zoom into to the view previously occupied by that particular table view and that happens correctly.

However the problem that I am facing is that since there is another table subview in the side, if I increase the frame size to say 250 or so, the part of the zoomed in view gets hidden by the tableview on the side ( as its as if a part of the zoomed in view goes under the tableview on the side).

Is there anyway to correct this so that my zoomed in view would not get hidden by the tableviews on its sides?

I hope I have explained my problem correctly...

Last edited by aldcorn@live.com; 04-14-2011 at 06:13 PM.
aldcorn@live.com is offline   Reply With Quote
Old 04-15-2011, 01:45 PM   #3 (permalink)
learner2011
 
Join Date: Mar 2011
Posts: 115
ashwinr87 is on a distinguished road
Default

thanks for your reply.. how do I access and set this index?

Quote:
Originally Posted by aldcorn@live.com View Post
there is a z index for all you views, This set their layer order.
ashwinr87 is offline   Reply With Quote
Old 04-15-2011, 02:08 PM   #4 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 551
aldcorn@live.com is on a distinguished road
Default This might help

iOS Open Source : UIView Category to Manage Z-Order of Views

Quote:
Originally Posted by ashwinr87 View Post
thanks for your reply.. how do I access and set this index?
aldcorn@live.com is offline   Reply With Quote
Old 04-15-2011, 02:09 PM   #5 (permalink)
learner2011
 
Join Date: Mar 2011
Posts: 115
ashwinr87 is on a distinguished road
Default

thank you very much...

Quote:
Originally Posted by aldcorn@live.com View Post
ashwinr87 is offline   Reply With Quote
Reply

Bookmarks

Tags
animation, ipad app, uiscrollvew, uisplitviewcontroller

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: 363
13 members and 350 guests
dansparrow, dre, ilmman, LezB44, lorrettaui53, Nobbsy, Objective Zero, oztemel, samdanielblr, shagor012, sledzeppelin, thephotographer, Trickphotostudios
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,119
Posts: 402,896
Top Poster: BrianSlick (7,990)
Welcome to our newest member, LezB44
Powered by vBadvanced CMPS v3.1.0

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