I am trying to understand the pattern of using the ReplsToSelector function in Monotouch. For example, the following translation does not work. (LayoutMargins is used to set cell indentation in iOS 8)
Goal C:
if ([tableView respondsToSelector:@selector(setLayoutMargins:)]) { [tableView setLayoutMargins:UIEdgeInsetsZero]; }
at Monotouch
if (this.TableView.RespondsToSelector(new Selector("setLayoutMargins"))) this.TableView.LayoutMargins = UIEdgeInsets.Zero;
I'm sure I just have a problem with the name "setLayoutMargins". I also tried LayoutMargins. Can someone help 1) correct this statement and 2) help me understand the naming convention / pattern?
Thanks!
source share