Touch events on UITableView?

前端 未结 7 696
[愿得一人]
[愿得一人] 2020-12-23 10:26

I have UIViewControllerand UITableView as child in the view, what I want to do is when I touch any row I am displaying a view at bottom. I want to

7条回答
  •  盖世英雄少女心
    2020-12-23 10:33

    In your controller class declare a method which removes the bottom view. Something like this:

    -(IBAction)bottomViewRemove:(id)sender {
    
    [bottomView removeFromSuperview];
    
    }
    

    In Interface Builder, select your view and in the identity inspector in the custom class section, change the class from UIView to UIControl. After that go to the connections inspector and connect the TouchUpInside event to the method declared above. Hope this helps.

提交回复
热议问题