ios - How to populate UIPickerView with Parse.com -


I'm stuck I have called PfQL and I NSG to my "categories" and all of this comes right in the Debugger area. is.

I'm having trouble using this data to populate my UIPickerView from Parse.com.

Here is what I came up with.

Note that I already have the necessary methods for the picker, I need to use the data to parse it.

_ Piccardia is a NSARR which popers the picker and I thought that I could be equal to things to populate but this does not work.

Edit: What have I done so far ...

  - (zero) viewDidoadload {[Super Viewedload]; // Setup an additional after loading the footage PFQuery * query = [PFQuery query worldname: @ "Categories"]; [Query whereKeyExists: @ "category"]; [Query commandbay-ordering: @ "created"]; [Query findObjectsInBackgroundWithBlock: ^ (NSArray * object, NSError * error) {if (error!) {_pickerData = objects; NSLog (@ "% @", objects); } And {nslog (@ "error"); }}]; Self.categoryPicker.dataSource = self; Self.categoryPicker.delegate = self; } // Number of columns of data - (int) number of Components Inpicar view: (UIPRView *) PickView {return1; } // Number of rows of data - (int) picker view: (UIPickerView *) picker numberoffrose incontinence: (NSINtega) component {return _ picture data quote; } To return the line and the component (column), the data is being passed in // - (NSString *) pickerView: (UIPickerView *) pickerView titleForRow: (NSInteger) forComponent: (NSInteger) component {_pickerData [ Line] return; }    

Try it as you mentioned above Items need to be reloaded after the query is received and the load array also keep in mind that this is an array of PFObjects, and you have to use a significant value for the title, in the PFObject for the title ForRow Can not plug in only: Data source call.

  - (zero) ViewDidload {[Super Viewedload]; // Setup an additional after loading the view. Self.categoryPicker.dataSource = self; Self.categoryPicker.delegate = self; PFQuery * query = [PFQuery query worldname: @ "Categories"]; [Query whereKeyExists: @ "category"]; [Query commandbay-ordering: @ "created"]; [Query findObjectsInBackgroundWithBlock: ^ (NSArray * objects, NSError * error) {if (error!) {_pickerData = objects; [Self.categoryPicker reloadAllComponents]; } And {nslog (@ "error"); }}]; } // Number of columns of data - (NSINGR) Number of Components Inpicar View: (UIPRV *) Pickbackview {return1; } // Number of rows of data - (NSInteger) pickerView: (UIPickerView *) pickerView numberOfRowsInComponent: (NSInteger) component {return_pickerData.count; } Data is going to return to line and component (column) that is being passed in - (NSString *) pickerView: (UIPickerView *) pickerView titleForRow: (NSInteger) forComponent: (NSInteger) component {PFObject * Object = _pickerData [line]; // Assume that "Category" is a string for your header return object [@ "Category"]; }    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -