Keyword: ios6, navigation controller, delegate, rotation, category,should Autoraotate, interface orientation
- project should be of empty application
- uncheck storyboard option.
- follow the below image.
2) Now add new file of Subclass of UINavigationController
Get contacts of all your emergency needs on single tap. Download Quick-Finder for iPhone
How to use should autorotate(ios 6) with navigation controller
1)Take a project named AutoRotationSample- project should be of empty application
- uncheck storyboard option.
- follow the below image.
2) Now add new file of Subclass of UINavigationController
3) Now add two more view controllers named firstViewController and secondViewController
4) open AppDelegate.h and modify the code as follow (modified code is in different color)
#import <UIKit/UIKit.h>
#import "firstViewController.h"
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (nonatomic,retain) UINavigationController *customNavigation;
@property (nonatomic,retain)firstViewController *first;
@end
5) Open AppDelegate.m and import two files as
#import "firstViewController.h"
#import "CustomNavigationController.h"
and synthesize two variables as
@synthesize first;
@synthesize customNavigation;
6) Now modify didFinishLaunchingMethod as (modified code is in different color)
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
self.first = [[[firstViewController alloc] initWithNibName:@"firstViewController" bundle:nil] autorelease];
self.customNavigation=[[CustomNavigationController alloc ]initWithRootViewController:self.first];
self.window.rootViewController = self.customNavigation;
[self.window makeKeyAndVisible];
return YES;
}
7) Now open CustomNavigationController.m and Implement two methods as
-(BOOL)shouldAutorotate
{
return YES;
}
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskAll;
}
8) Now every view of your app supports auto rotating.
Note: If you want to auto rotate only one view than
In CustomNavigationController.m modify the code as
-(BOOL)shouldAutorotate
{
//return YES;
return [self.navigationController.topViewController shouldAutorotate];
}
in this case you should implement
-(BOOL)shouldAutorotate
{
return YES;
}
in viewcontroller which u want to rotate.
Fon perde modelleri
ReplyDeleteSMS ONAY
mobil ödeme bozdurma
nftnasilalinir.com
Ankara Evden Eve Nakliyat
Trafik sigortasi
dedektör
website kurma
ask romanlari
ataşehir alarko carrier klima servisi
ReplyDeleteçekmeköy daikin klima servisi
maltepe toshiba klima servisi
maltepe beko klima servisi
kadıköy beko klima servisi
kartal lg klima servisi
ümraniye lg klima servisi
kartal alarko carrier klima servisi
ümraniye alarko carrier klima servisi
Good text Write good content success. Thank you
ReplyDeletetipobet
kibris bahis siteleri
kralbet
poker siteleri
betpark
mobil ödeme bahis
bonus veren siteler
betmatik
van
ReplyDeleteyalova
diyarbakır
düzce
gümüşhane
GPRA
bitlis
ReplyDeletekastamonu
artvin
ısparta
hatay
4DCTC
kuşadası
ReplyDeletemilas
çeşme
bağcılar
siirt
UKL1A
شركة مكافحة حشرات بالخبر B0Q3rpD0lG
ReplyDeleteشركة تنظيف منازل بعنيزة
ReplyDelete2scka4zuwi
Digital Marketing Agency In Jeddah
ReplyDeleteData Science Training In Hyderabad With Placement
ReplyDeleteMaster Workday Advanced Studio Training In India
ReplyDeleteWorkday Payroll Training In India: A Complete Guide to Mastering Payroll in the Cloud
ReplyDeleteIt's very nice blog and useful for students and developer ,madinagudadentist.in offers a comprehensive range of treatments, including dental implants, teeth whitening, braces, and more. With a team of experienced professionals and state-of-the-art technology, they ensure personalized care for every patient. Whether it's a routine check-up or a specialized procedure, madinagudadentist.in is your go-to destination for quality dental services in Madinaguda.
ReplyDeletebest dental clinic in madinaguda
I found something new in your blog thank you for sharing this interesting and informative content .I recently visited madinagudadentist.in for a dental implant and was really impressed with the care and technology they use. The procedure was smooth, and the results are amazing. One of the best options in Madinaguda for implants.
ReplyDeleteBest Dental Implant Clinic in Madinaguda
Thanks for the Valuable information.Really useful information. Thank you so much for sharing. It will help everyone.
ReplyDeleteI had a great experience with root canal treatment at madinagudadentist.in. The procedure was smooth, and the pain relief was almost immediate. For anyone in Madinaguda looking for expert dental care, this hospital is a trusted choice.
Root Canal Treatment in Madinaguda
Very useful post and I think it is rather easy to see from the other comments as well that this post is well written and useful.
ReplyDeletemadinagudadentist.in is the go-to place in Madinaguda for Invisalign treatment. Their team made the whole process easy and comfortable. Great option if you're looking for a clear and hassle-free way to straighten your teeth.
Invisalign Providers in Madinaguda
Nice blog happy to see you are helping the people for better understanding.
ReplyDeleteI had a great experience with oral surgery at madinagudadentist.in. The doctors were professional, and the procedure was handled with care and precision. Anyone in Madinaguda looking for safe and effective oral surgery should definitely consider this hospital.
Oral Surgery Treatment In Madinaguda
Thank you for sharing the article. The data that you provided in the blog is informative and effective.
ReplyDeletemadinagudadentist.in is a great place for kids' dental care in Madinaguda. The pediatric dentist is very friendly and made my child feel completely at ease. Highly recommend this hospital for child-friendly and expert dental treatment.
Best Pediatric Dentist in Madinaguda
very nice blogger thanks for sharing.
ReplyDeletemadinagudadentist.in has some of the best gum specialists in Madinaguda. I visited for gum treatment and was impressed by their professional care and modern techniques. A great place for anyone facing gum issues.
Best Gum Specialist in Madinaguda
I’m planning to start my blog soon, but I’m a little lost on everything.
ReplyDeleteI had a great experience with the crowns treatment at madinagudadentist.in. The fit and finish were perfect, and it really improved my smile. Highly recommended for anyone in Madinaguda looking for quality dental restorations.
Crowns Treatment in Madinaguda
Thanks a lot for sharing such a good source with all, i appreciate your efforts taken for the same.
ReplyDeleteI started my invisible aligners treatment at madinagudadentist.in and the experience has been amazing. The aligners are comfortable and barely noticeable. Great option for anyone in Madinaguda looking to straighten their teeth discreetly.
Invisible Aligners Treatment in Madinaguda
Thanks for the Valuable information.Really useful information.
ReplyDeletemadinagudadentist.in provides top-quality braces treatment with noticeable results. The staff is friendly, and they use the latest techniques to ensure comfort. A great place in Madinaguda for anyone looking to improve their smile.
Best Braces Dentist in Madinaguda