Skip to content

Instantly share code, notes, and snippets.

View matteom's full-sized avatar

Matteo Manferdini matteom

View GitHub Profile
@matteom
matteom / gist:7546811
Created November 19, 2013 15:13
Model class for leads
@interface PCLead : NSObject
@property NSString *name;
@property NSString *surname;
@property NSString *company;
@end
@matteom
matteom / gist:7546424
Created November 19, 2013 14:48
Required UITableViewDataSource methods
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 7;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"LeadCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
return cell;
}
@matteom
matteom / gist:7545617
Created November 19, 2013 13:48
View Controller with Dynamic Type
@interface PCLeadViewController ()
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *surnameLabel;
@property (weak, nonatomic) IBOutlet UILabel *companyLabel;
@property (strong, nonatomic) IBOutletCollection(UILabel) NSArray *captionLabels;
@property (strong, nonatomic) IBOutletCollection(UILabel) NSArray *labels;
@end
@matteom
matteom / gist:7545009
Last active December 28, 2015 18:39
Initializing of labels in the Lead View Controller
@interface PCLeadViewController ()
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *surnameLabel;
@property (weak, nonatomic) IBOutlet UILabel *companyLabel;
@end
- (void)viewDidLoad {
[super viewDidLoad];