iphone - ios method param assign global variable -


Why is the class NSMutableArray arl count still 0?

Is there any way around this?

Class B

  BH # import & lt; Foundation / Foundation. H & gt; # Imports "AH" @Interface B: NSOBEIS - (zero) DOSMANG;           ", @" 3 ", @" 4 ", zero]; A * A = [[A allot] init]; [one getValue: array];}  

class A

ah

  #import & lt; UKit / UKit.h & gt; @ class B; @ Intifes A: UIViewController; @ property (strong, Nonatomic) Ansamayutiablare * Arl; - array (zero) GetValue: (NSMutableArray *); - (IBAction) button: (id) this; @end  

Am

  @implementation A @ synthesis Arley; - (void) Drishydidlod {[super Wudidlod ]; B * B = [[B Elok] Init] [B Dotsing];} - (void) getValue: (NSMutableArray *) array {arl = array; // arl = [[NSMutableArray alloc] initWithArray: Array]; // [arl addObjectFromArray: Array]; Anselog (@ "Arlk count:% d", [Arl count]); // is connected here 4 - (IBAction) button: (id) sender {Anselog (@ "Arl count:% d", [Arl count]); // log on here 0}   "post-text" itemprop = "text"> 

You do A in doSomething . This example is not the same as the example associated with your button: method, with arl is not even started and therefore there are no items in it, so counting zero when the button is called


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -