Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 6    Views: 73

Absentia
buzztouch Evangelist
Profile
Posts: 960
Reg: Oct 20, 2011
Alaska
20,600
03/21/13 07:15 PM (12 years ago)

control transitions programatically?

I'm using the following block of code to call up a screen - BT_item *screenObjectToLoad = [appDelegate.rootApp getScreenDataByNickname:@"proquiz"]; [BT_viewControllerManager handleTapToLoadScreen:self.screenData theMenuItemData:nil theScreenData:screenObjectToLoad]; Works great, the only issue is that doing it this way causes the transition to default to the "slide-to-left" transition. All of the other transitions in my app are fades so it looks very out of place. Is there any line of code that I can add in there to make it fade?
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/21/13 08:22 PM (12 years ago)
The BT_item object has a property called json_vars (or something real close to that). It is a NSDictionary. Just add a key for the transition property and you should be all set. I made a post a couple days back that showed how to do this with other JSON properties. Same concept.
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
03/22/13 12:54 AM (12 years ago)
Away from BT the code I use to, say, push back to a menu would be: -(IBAction) pushBack:(id)sender { ViewController *screen = [[ViewController alloc] initWithNibName:nil bundle:nil]; screen.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; [self presentModalViewController:screen animated:YES]; [screen release]; } This would give a 'crossdissolve' as per the code. There are 4 styles in total in this method, 'CoverVertical', 'FlipHorizontal' and 'StylePartialCurl'.
 
Absentia
buzztouch Evangelist
Profile
Posts: 960
Reg: Oct 20, 2011
Alaska
20,600
like
03/24/13 10:09 AM (12 years ago)
@Chris1 - That reply helped me get it working! Thanks a lot for the help guys
 
Absentia
buzztouch Evangelist
Profile
Posts: 960
Reg: Oct 20, 2011
Alaska
20,600
like
03/25/13 09:22 PM (12 years ago)
@Chris1 - turns out I'm still having a bit of trouble understanding exactly what you meant...would it be possible for you to direct me to the previous post you're referring to? BT advanced search isn't doing the trick
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/25/13 09:59 PM (12 years ago)
 
Absentia
buzztouch Evangelist
Profile
Posts: 960
Reg: Oct 20, 2011
Alaska
20,600
like
03/25/13 10:19 PM (12 years ago)
Perfect! Thanks again
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.