When i press the back button. the iCarousel
is still shows up for 1 second.why is this happening and how to stop this.I have used storyboard to create a iCarosel view..
- (void)viewDidUnload
{
[super viewDidUnload];
self.carousel = nil;
}
- (void)dealloc
{
carousel.delegate = nil;
carousel.dataSource = nil;
}
- (NSUInteger)numberOfItemsInCarousel:(iCarousel *)carousel
{
return [idOfAllWords count];
}
- (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSUInteger)index reusingView:(UIView *)view
{
UILabel *label = nil;
//create new view if no view is available for recycling
if (view == nil)
{
view = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 250.0f, 250.0f)];
((UIImageView *)view).image = [UIImage imageNamed:@"page.png"];
view.contentMode = UIViewContentModeCenter;
label = [[UILabel alloc] initWithFrame:view.bounds];
label.backgroundColor = [UIColor clearColor];
label.textAlignment = NSTextAlignmentCenter;
label.font = [label.font fontWithSize:50];
label.tag = 1;
[view addSubview:label];
}
else
{
label = (UILabel *)[view viewWithTag:1];
}
Words *word=nil;
word=idOfAllWords[index];
label.text =word.Name;
return view;
}