Note that there are some explanatory texts on larger screens.

plurals
  1. PONSMuttableArray,TableView , Switch Views Programmatically
    primarykey
    data
    text
    <p>I am a new Programmer of Iphone..... i have a little problem in accessing the NSMuttable array in my programe...</p> <p>i am generating a view programmatically on button click .... code on button click is </p> <pre><code>-(IBAction)buttonClicked { secondView=[[TabBarSearchSecondView alloc]init]; [myView addSubview:secondView.view]; } </code></pre> <p>inTabBarSearchSecondView .h file.....</p> <pre><code>@interface ...... NSMuttableArray *searchResult; @end @property (nonatomic,retain)NSMuttableArray *searchResult; </code></pre> <p><strong>in TabBarSearchSecondView .m file.........</strong></p> <pre><code>@synthesize searchResult; - (void)loadView { CGRect cgRct = CGRectMake(0.0, 0.0, 480, 320); //define size and position of view myView = [[UIView alloc] initWithFrame:cgRct]; //initilize the view //open database DbOpenAndClose *dbObject=[[DbOpenAndClose alloc]init]; [dbObject openDatabase]; //for call of search showroom SearchProduct *object=[[SearchProduct alloc]init]; searchResult=[object searchShowrooms:productname:cityname]; [dbObject closeDatabase]; count=[searchResult count];/// print 3 because 3 record match in database UITableView *table=[[UITableView alloc]initWithFrame:CGRectMake(4,80,312,325) style:UITableViewStylePlain]; //table.delegate=self; table.dataSource=self; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { //NSLog(@"%i", [searchResult count]); return [searchResult count]; ///Not accessible here...Application Crash Here... } </code></pre> <p>thanks for giving your valueable time for my Code...... thanks in Advance</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload