开发者

identifying event on Tableview controller and also Tabbar controller?

i have two questions here..?

if i scroll 开发者_JS百科my tableview,how can i identify it...is there any method to identify it? any help please?

if i touch already selected Tab bar item ,can i identify it? any help please


UITableview conforms to the UIScrollViewDelegate Protocol therefore in your tableview delegate class you can respond to

– scrollViewDidScroll:
– scrollViewWillBeginDragging:
– scrollViewDidEndDragging:willDecelerate:

UITabBar can also have a delegate method that you can override so you can simply do something like:

- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item{

if (tabBar.selectedItem == item)
   {
     //tabBar button has been pressed but is already selected so do something.
   } 
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜