Open rushabh0999 opened 11 years ago
Hi, i m using bctabbarcontroller in my project i am follw the below link step to integerate
http://stackoverflow.com/questions/18375243/use-bctabbarcontroller-in-iphone-project
i Integaret successfully but when i click on second tab then it crash
Here is My Code :-1:
AppDelegate .h
@class BCTabBarController;
@interface AppDelegate : UIResponder
{
} @property (nonatomic, retain) BCTabBarController tabBarController; @property (strong, nonatomic) UIWindow window;
@property (strong, nonatomic) UINavigationController *navigationController;
@end
AppDeleagte .m
(BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictionary )launchOptions { self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; // Override point for customization after application launch.
self.tabBarController = [[BCTabBarController alloc] init];
self.tabBarController.viewControllers = [NSArray arrayWithObjects: [[UINavigationController alloc] initWithRootViewController:[[ViewController1 alloc] init]], [[ViewController2 alloc] init], nil];
[self.window addSubview:self.tabBarController.view]; [self.window makeKeyAndVisible];
return YES; }
main.m
int main(int argc, char *argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } }
Crash :-1:
[__NSArrayM indexOfObject:]: message sent to deallocated
Thanks in Advance :)
Hi, i m using bctabbarcontroller in my project i am follw the below link step to integerate
http://stackoverflow.com/questions/18375243/use-bctabbarcontroller-in-iphone-project
i Integaret successfully but when i click on second tab then it crash
Here is My Code :-1:
AppDelegate .h
import <UIKit/UIKit.h>
@class BCTabBarController;
@interface AppDelegate : UIResponder
{
} @property (nonatomic, retain) BCTabBarController tabBarController; @property (strong, nonatomic) UIWindow window;
@property (strong, nonatomic) UINavigationController *navigationController;
@end
AppDeleagte .m
(BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictionary )launchOptions { self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; // Override point for customization after application launch.
self.tabBarController = [[BCTabBarController alloc] init];
self.tabBarController.viewControllers = [NSArray arrayWithObjects: [[UINavigationController alloc] initWithRootViewController:[[ViewController1 alloc] init]], [[ViewController2 alloc] init], nil];
[self.window addSubview:self.tabBarController.view]; [self.window makeKeyAndVisible];
return YES; }
main.m
import <UIKit/UIKit.h>
import "AppDelegate.h"
int main(int argc, char *argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } }
Crash :-1:
[__NSArrayM indexOfObject:]: message sent to deallocated
Thanks in Advance :)