depicus

  just another nerd on the interweb…



  • home
  • gallery
  • play page
  • privacy
  • support
  • videos
  • what is depicus

Archive for July, 2010

Show me the next iView

Saturday, July 31st, 2010



Because I always forget ….

1. In the starting .h file

View Code OBJC
1
2
#import "frmMain.h"
@interface frmStart : UIViewController <frmMainDelegate>

2. In the starting form .m file

View Code OBJC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#import "frmMain.h"
 
@synthesize delegate;
 
-(void) onPressMain {
  NSString *nibVersion = @"frmMain";
if (iPadCheck)
{
    NSLog(@"Is an iPad");
    nibVersion = @"frmMainiPad";
}
frmMain *controller = [[frmMain alloc] initWithNibName:nibVersion bundle:nil];
controller.delegate = self;
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:controller animated:YES];  
}

2. In the starting .h file

View Code OBJC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#import "frmMain.h"
 
-(void) onPressMain {
  NSString *nibVersion = @"frmMain";
if (iPadCheck)
{
    NSLog(@"Is an iPad");
    nibVersion = @"frmMainiPad";
}
frmMain *controller = [[frmMain alloc] initWithNibName:nibVersion bundle:nil];
controller.delegate = self;
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:controller animated:YES];  
}
 
- (void)frmMainDelegateDidFinish:(frmMain *)controller {
	[self dismissModalViewControllerAnimated:YES];
}

3. In the main .h file

View Code OBJC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@protocol frmMainDelegate;
 
@interface frmMain : UIViewController {
    id <frmMainDelegate> delegate;
    UIWindow *window;
    UITabBarController *tabBarController;
}
 
@property (nonatomic, assign) id <frmMainDelegate> delegate;
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UITabBarController *tabBarController;
 
@end
 
@protocol frmMainDelegate
 
- (void)frmMainDelegateDidFinish:(frmMain *)controller;
 
@end

4. In the main .m file

View Code OBJC
1
@synthesize delegate;

Tags: Apple, iPad, iPhone, iPod Touch
Posted in Software Development | Comments Off

  • how i pay the bills

  • depicus in africa

    depicus in africa
  • my charity page

    JustGiving - Sponsor me now!
  • friends

    • Agency Manager
    • AllClear Travel
    • Climbing Tikes
    • Globe Bloggers
    • Marchday
    • The Travel Toad
  • gallery

    IMG_3535 Bisley Developments Ltd IMG_4252 Bisley Developments Ltd
  • videos

    Vimeo

    YouTube
  • twitter

    • No public Twitter messages.
  • recent comments

    • john coull: correction to above, its www.oakley-ukstore.com
    • john coull: they are at it again. adverts on facebook . they are being hosted by enotch.com on ip address...
    • steve: The site are selling £120+ Oakley sun glasses for £13.00 I think its safe to say they may be either...
    • rob: have received a pair of glasses not what ive ordered they are now telling me the ones ive ordered are out of...
    • phil: hi i have purchased some (stupidly),not arrived yet, will they arrive/will they be fake/plz help

Copyright © - depicus | Entries (RSS) | Comments (RSS)

WordPress theme butchered and amended by me.