ios6 - iCarousel integration to app having Tab bar controller in iOS 6.1 -
i integrate icarousel app single view application.but when add tab bar controller , place icarousel code in 1 tab bar item viewcontroller.but not work(items displayed not scrolled).what problem here.
i created icarousel below:
icarousel *categorysubview = [[icarousel alloc]initwithframe:cgrectmake(0,200, 300, 125)]; categorysubview.autoresizingmask = uiviewautoresizingflexiblewidth | uiviewautoresizingflexibleheight; categorysubview.delegate = self; categorysubview.datasource = self; categorysubview.type=icarouseltyperotary; [self.view addsubview:categorysubview];
i using following delegae , data source methods:
-(nsuinteger)numberofitemsincarousel:(icarousel *)carousel { return 5; } - (uiview *) carousel:(icarousel *)carousel viewforitematindex:(nsuinteger)index reusingview:(uiview *)view{ uiview *sampleview=[[uiview alloc]initwithframe:cgrectmake(0, 0, 250, 300)]; sampleview.backgroundcolor=[uicolor whitecolor]; uilabel *labelis=[[uilabel alloc]initwithframe:cgrectmake(10, 10, 100, 20)]; labelis.backgroundcolor=[uicolor clearcolor]; labelis.text=@"8apr-14apr"; [sampleview addsubview:labelis]; return sampleview; }
please suggest me.
thanks inadvance
i notice carousel view smaller size of items inside (it's 125 points high).
icarousel can draw outside of bounds, cannot detect touch events outside of bounds, might why having trouble scrolling.
a way debug set carousel.clipstobounds = yes, way draws match touchable. option set carousel.backgroundcolor can see part of touchable on screen.
another thing check view you've placed carousel inside has userinteractionenabled set yes.
Comments
Post a Comment