问题描述:

I have a ButtonCell, which i want to hide using bindings, when the NSString value at keyPath

key1.key2

is larger than 3 character, but the binding offers me only

NSIsNotNil, NSIsNil,...

which doesnt apply in this case

网友答案:

Well In your XIB select you button then as attached in the screens shot follow the steps:-

  1. Now in your header and implementation file create property and synthesize variable of BOOL isEnable;
  2. And on the basis of your string count set it NO and YES.
网友答案:

you can use this method:

-(void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context

in this one you can enable and disable cell according the value in key path

相关阅读:
Top