Inherits from UIViewController
Conforms to UIActionSheetDelegate
UIPickerViewDataSource
UIPickerViewDelegate
UITableViewDataSource
UITableViewDelegate
Declared in AddChoiceViewController.h
AddChoiceViewController.m

Properties

content

@property (weak, nonatomic) IBOutlet UITextView *content

contentView

@property (weak, nonatomic) IBOutlet UIView *contentView

currentChoicePath

@property (nonatomic, strong) NSString *currentChoicePath

description

@property (weak, nonatomic) IBOutlet UITextField *description

generalView

@property (weak, nonatomic) IBOutlet UIView *generalView

groupButton

@property (weak, nonatomic) IBOutlet UIButton *groupButton

groupPretext

@property (weak, nonatomic) IBOutlet UILabel *groupPretext

image

@property (weak, nonatomic) IBOutlet UIImageView *image

linksTable

@property (weak, nonatomic) IBOutlet UITableView *linksTable

mediaLinks

@property (strong, nonatomic) NSMutableArray<LinkModel> *mediaLinks

private

@property (weak, nonatomic) IBOutlet UISwitch *private

rating

@property (weak, nonatomic) IBOutlet UISlider *rating

ratingText

@property (weak, nonatomic) IBOutlet UILabel *ratingText

referenceLinks

@property (strong, nonatomic) NSMutableArray<LinkModel> *referenceLinks

referenceView

@property (weak, nonatomic) IBOutlet UIView *referenceView

segmentControl

@property (weak, nonatomic) IBOutlet UISegmentedControl *segmentControl

user

@property (nonatomic, strong) UserModel *user

Instance Methods

actionSheet:clickedButtonAtIndex:

Standard delegate to handle events from Action Sheet

- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex

Parameters

actionSheet

The Action Sheet

buttonIndex

The button that was clicked

Declared In

AddChoiceViewController.m

alertView:clickedButtonAtIndex:

Standard iOS Alert Box button handlers

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex

Parameters

alertView

The Alert View

buttonIndex

Index to the button that was clicked

Declared In

AddChoiceViewController.m

didReceiveMemoryWarning

Standard iOS delegate for handling memory warnings

- (void)didReceiveMemoryWarning

Declared In

AddChoiceViewController.m

numberOfComponentsInPickerView:

Standard delegate for PickerView for number of components in the picker

- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)thepickerView

Parameters

thepickerView

The PickerView

Return Value

Return count of Components

Declared In

AddChoiceViewController.m

numberOfSectionsInTableView:

Return number of Sections in the Collection View

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView

Parameters

collectionView

this Collection View

Return Value

Return number of Sections

Declared In

AddChoiceViewController.m

onAddMediaLinkClick:

Handler for the Add Media Link button

- (IBAction)onAddMediaLinkClick:(id)sender

Parameters

sender

Sender of the event

Declared In

AddChoiceViewController.m

onAddReferenceLinkClick:

Handler for the Add Reference Link button

- (IBAction)onAddReferenceLinkClick:(id)sender

Parameters

sender

Sender of the event

Declared In

AddChoiceViewController.m

onClickHelp:

Handler for the Help button

- (IBAction)onClickHelp:(id)sender

Parameters

sender

Sender of the event

Declared In

AddChoiceViewController.m

onClickSave:

Handler for the Save button

- (IBAction)onClickSave:(id)sender

Parameters

sender

Sender of the event

Declared In

AddChoiceViewController.m

onPasteImageClick:

Handler for the Paste Image button

- (IBAction)onPasteImageClick:(id)sender

Parameters

sender

Sender of the event

Declared In

AddChoiceViewController.m

onPrivateSwitched:

Handler for the Private Switch

- (IBAction)onPrivateSwitched:(UISwitch *)sender

Parameters

sender

Sender of the event

Declared In

AddChoiceViewController.m

onRatingChange:

Handler for the Rating Slider change

- (IBAction)onRatingChange:(id)sender

Parameters

sender

Sender of the event

Declared In

AddChoiceViewController.m

onSegmentClick:

Handler for the Segment Control

- (IBAction)onSegmentClick:(UISegmentedControl *)sender

Parameters

sender

Sender of the event

Declared In

AddChoiceViewController.m

onSelectGroupButtonClick:

Handler for the Select Group button

- (IBAction)onSelectGroupButtonClick:(id)sender

Parameters

sender

Sender of the event

Declared In

AddChoiceViewController.m

pickerView:numberOfRowsInComponent:

Standard delegate for PickerView for number of rows in the picker

- (NSInteger)pickerView:(UIPickerView *)thepickerView numberOfRowsInComponent:(NSInteger)component

Parameters

thepickerView

The PickerView

component

The PickerView Component

Return Value

Return count of rows

Declared In

AddChoiceViewController.m

pickerView:titleForRow:forComponent:

Standard delegate for PickerView to display rows in the picker

- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component

Parameters

pickerView

The PickerView

row

The row in the PickerView

component

THe PickerView Component

Return Value

Return row display content

Declared In

AddChoiceViewController.m

setRatingText

Helper method to display the Rating

- (void)setRatingText

Declared In

AddChoiceViewController.m

tableView:cellForRowAtIndexPath:

Initialize a Cell in the Table View

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

Parameters

tableView

The Table View

indexPath

Index to the Cell in the Table View

Return Value

Return the Cell

Declared In

AddChoiceViewController.m

tableView:numberOfRowsInSection:

Return number of Items in the Section of the Collection View

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section

Parameters

section

Section the Section

collectionView

This Collection View

Return Value

Return the number of rows in the Collection

Declared In

AddChoiceViewController.m

tableView:titleForHeaderInSection:

Set the titles of the Sections

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section

Parameters

tableView

The Table View

section

The Section in the Table View to update

Return Value

<#return value description#>

Declared In

AddChoiceViewController.m

textFieldShouldReturn:

Standard iOS delegate for keyboard handling in text boxes.

- (BOOL)textFieldShouldReturn:(UITextField *)textField

Return Value

<#return value description#>

Declared In

AddChoiceViewController.m

touchesBegan:withEvent:

Standard iOS delegate for dismissing keyboard in text boxes.

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event

Return Value

<#return value description#>

Declared In

AddChoiceViewController.m

viewDidLoad

Load and initialize the Controller for the Add Choice View

- (void)viewDidLoad

Declared In

AddChoiceViewController.m

viewWillAppear:

Standard iOS delegate when this view is displayed.

- (void)viewWillAppear:(BOOL)animated

Parameters

animated

animated If animated view

Declared In

AddChoiceViewController.m