ios - How to access UIButton (or any UIElement) inside UITableViewHeaderFooterView subclass? -


i'm learning uitableview in objective-c. hint me how access uibutton inside uitableviewheaderfooterview subclass uiviewcontroller class? programatically, don't use ib.

full code: https://gist.github.com/tomnaz/3d790b308d305af8b98c

[[??? btnedit] addtarget:self                           action:@selector(addnewitem:)                 forcontrolevents:uicontroleventtouchupinside]; 

don't in viewdidload, in viewforheaderinsection: have pointer header view.

- (uiview *)tableview:(uitableview *)tableview viewforheaderinsection:(nsinteger)section {     static nsstring *headerreuseidentifier = @"tableviewsectionheaderviewidentifier";      itemsheaderview *sectionheaderview = [tableview dequeuereusableheaderfooterviewwithidentifier:headerreuseidentifier];     [sectionheaderview.btnedit addtarget:self action:@selector(addnewitem:) forcontrolevents:uicontroleventtouchupinside];      return sectionheaderview; } 

Comments

Popular posts from this blog

How to run C# code using mono without Xamarin in Android? -

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -