Skip to content

Instantly share code, notes, and snippets.

View dmathewwws's full-sized avatar
🤠

Daniel Mathews dmathewwws

🤠
View GitHub Profile
Delegation should be preferred method. For more information, see http://www.objc.io/issue-7/communication-patterns.html
The custom collection view cell subclass header should look similar to the following code snippet. A couple of things to look for:
It is important that the delegate callbacks include the cell (sender in the following snippet) as one of the parameters. We will need to know which cell invokes the delegate callback in order to find the index path for the cell, which we will then use to retrieve the Photo object to pass to the method to either share or report the photo.
The custom collection view cell subclass should never have or keep a reference to the photo object. Doing so would break MVC pattern where the view should never talk to the model directly.
@import UIKit;
@protocol PanoramaPhotoCollectionViewCellDelegate;
## Week 3 Interview Questions
#### Goals
- Understand Storyboards
- Understanding basic application architecture
- Familiarity with most common Cocoa/Foundation classes & patterns (delegation, target-action)
##### Question 1
//
// LHDFingerpaintView.m
// Drawing
//
// Created by Steven Masuch on 2014-07-31.
// Copyright (c) 2014 Lighthouse Labs. All rights reserved.
//
#import "LHDFingerpaintView.h"