P
P
Petrushka2015-03-27 02:59:36
Objective-C
Petrushka, 2015-03-27 02:59:36

Linking storyboard elements with code?

Good day, I'm studying storyboards in Obzh-S
I figured out how to install outlets to property elements

@interface ViewController ()
@property (weak, nonatomic) IBOutlet UIView *someView;
- (IBAction)someButton:(id)sender;
@end

but what does it mean when we write elements in brackets?
@interface ViewController () <UIImagePickerControllerDelegate,UIActionSheetDelegate,UINavigationControllerDelegate>

{
    UIImagePickerController * imagePicker;
    UIActionSheet * actionSheet;
    IBOutlet UIImageView * captureImage;
}
- (IBAction)actionCaptureImage:(UIButton *)sender;
@end

PS sorry for my literacy)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
ManWithBear, 2015-03-27
@petruska

These are normal object properties, but unlike @property, we need to manually create getters and setters.

F
feniksqip, 2015-03-28
@feniksqip

What you have with the button is a method! and it is not necessary to associate it with an element in the storyboard.
(UIButton *) - creates a link to a new instance of the Button (UIButton) class.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question