I am building view based application,which has many pages an in every page ther will be home button,which will call homepage but my problem is whenever i call home page the view will reload but i dont need to reload so please suggest me….
HomePage.m
- (void)viewDidLoad {
[super viewDidLoad];
twitAll=0;
facAll=0;
CrtPage=0;
flag=[[NSString alloc]init];
[self Maintainpages];
[tbv setFrame:CGRectMake(0*self.scrollView.frame.size.width,0,self.scrollView.frame.size.width,self.scrollView.frame.size.height-90)];
[tbv1 setFrame:CGRectMake(1*self.scrollView.frame.size.width,0,self.scrollView.frame.size.width,self.scrollView.frame.size.height-90)];
[tbv2 setFrame:CGRectMake(2*self.scrollView.frame.size.width,0,self.scrollView.frame.size.width,self.scrollView.frame.size.height-90)];
[tbv3 setFrame:CGRectMake(3*self.scrollView.frame.size.width,0,self.scrollView.frame.size.width,self.scrollView.frame.size.height-90)];
tbv1.hidden=YES;
tbv2.hidden=YES;
tbv3.hidden=YES;
tbv.hidden=YES;
self.view.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"Background-bluegray.png"]];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(LoginCompletedSuccess:) name:@"IntigrateCompleted" object:nil];
topbar.backgroundColor=[[[UIColor alloc]initWithPatternImage:[UIImage imageNamed:@"top-bar.png"]]autorelease];
bottombar.backgroundColor=[[[UIColor alloc]initWithPatternImage:[UIImage imageNamed:@"top-bar.png"]]autorelease];
}
For not reloading the view you should add all newView as subview of the parent view with this source code.
and bring this subView to front
On click the home button remove all subView’s and it will should you the parentView