-
Notifications
You must be signed in to change notification settings - Fork 26
Homework #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
arturlan
wants to merge
1
commit into
accesscode-2-2:master
Choose a base branch
from
arturlan:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Homework #30
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // | ||
| // AVColorPickerCommProtocol.h | ||
| // PartTwo | ||
| // | ||
| // Created by Artur Lan on 9/18/15. | ||
| // Copyright © 2015 Mike Kavouras. All rights reserved. | ||
| // | ||
|
|
||
| #import <Foundation/Foundation.h> | ||
|
|
||
| @protocol AVColorPickerCommProtocol <NSObject> | ||
|
|
||
| -(void)didSelectColor:(UIColor *)color; | ||
|
|
||
| @end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| // | ||
| // AVSocialMediaView.h | ||
| // PartTwo | ||
| // | ||
| // Created by Artur Lan on 9/18/15. | ||
| // Copyright © 2015 Mike Kavouras. All rights reserved. | ||
| // | ||
|
|
||
| #import <UIKit/UIKit.h> | ||
| #import "AVColorPickerCommProtocol.h" | ||
| #import "AVSocialMediaView.h" | ||
|
|
||
| @interface AVSocialMediaView : UIView | ||
|
|
||
| @property (nonatomic, weak) id <AVColorPickerCommProtocol> delegate; | ||
|
|
||
|
|
||
| @end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| // | ||
| // AVSocialMediaView.m | ||
| // PartTwo | ||
| // | ||
| // Created by Artur Lan on 9/18/15. | ||
| // Copyright © 2015 Mike Kavouras. All rights reserved. | ||
| // | ||
|
|
||
| #import "AVSocialMediaView.h" | ||
| #import "AVColorPickerCommProtocol.h" | ||
|
|
||
|
|
||
| @implementation AVSocialMediaView | ||
|
|
||
| - (IBAction)commentButtonTapped:(id)sender { | ||
| UIColor *color = [UIColor redColor]; | ||
| [self.delegate didSelectColor:color]; | ||
| } | ||
| - (IBAction)likeButtonTapped:(id)sender { | ||
| UIColor *color = [UIColor greenColor]; | ||
| [self.delegate didSelectColor:color]; | ||
| } | ||
| - (IBAction)shareButtonTapped:(id)sender { | ||
| UIColor *color = [UIColor blueColor]; | ||
| [self.delegate didSelectColor:color]; | ||
| } | ||
|
|
||
| @end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,73 @@ | ||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r"> | ||
| <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r"> | ||
| <dependencies> | ||
| <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/> | ||
| <deployment identifier="iOS"/> | ||
| <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/> | ||
| </dependencies> | ||
| <scenes> | ||
| <!--View Controller--> | ||
| <scene sceneID="tne-QT-ifu"> | ||
| <objects> | ||
| <viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController"> | ||
| <viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController"> | ||
| <layoutGuides> | ||
| <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/> | ||
| <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> | ||
| </layoutGuides> | ||
| <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> | ||
| <rect key="frame" x="0.0" y="0.0" width="600" height="600"/> | ||
| <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
| <subviews> | ||
| <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xcy-PO-TvN" userLabel="customView" customClass="AVSocialMediaView"> | ||
| <rect key="frame" x="170" y="120" width="260" height="350"/> | ||
| <subviews> | ||
| <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pN4-rP-PRo"> | ||
| <rect key="frame" x="107" y="160" width="46" height="30"/> | ||
| <state key="normal" title="Like"/> | ||
| <connections> | ||
| <action selector="likeButtonTapped:" destination="xcy-PO-TvN" eventType="touchUpInside" id="jgz-cu-Xex"/> | ||
| </connections> | ||
| </button> | ||
| <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hv4-PP-Jf1"> | ||
| <rect key="frame" x="110" y="240" width="40" height="30"/> | ||
| <state key="normal" title="Share"/> | ||
| <connections> | ||
| <action selector="shareButtonTapped:" destination="xcy-PO-TvN" eventType="touchUpInside" id="dWX-02-ato"/> | ||
| </connections> | ||
| </button> | ||
| <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ecp-9P-vue"> | ||
| <rect key="frame" x="96" y="80" width="67" height="30"/> | ||
| <state key="normal" title="Comment"/> | ||
| <connections> | ||
| <action selector="commentButtonTapped:" destination="xcy-PO-TvN" eventType="touchUpInside" id="uRi-bv-n2v"/> | ||
| </connections> | ||
| </button> | ||
| </subviews> | ||
| <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | ||
| <constraints> | ||
| <constraint firstItem="Ecp-9P-vue" firstAttribute="centerX" secondItem="xcy-PO-TvN" secondAttribute="centerX" id="BhL-Ec-iIS"/> | ||
| <constraint firstItem="hv4-PP-Jf1" firstAttribute="centerX" secondItem="xcy-PO-TvN" secondAttribute="centerX" id="Iqz-R9-86C"/> | ||
| <constraint firstAttribute="width" constant="260" id="QSW-Un-Ib0"/> | ||
| <constraint firstAttribute="height" constant="350" id="a4d-oV-38n"/> | ||
| <constraint firstItem="pN4-rP-PRo" firstAttribute="top" secondItem="Ecp-9P-vue" secondAttribute="bottom" constant="50" id="bJ2-9a-uGU"/> | ||
| <constraint firstItem="pN4-rP-PRo" firstAttribute="centerX" secondItem="xcy-PO-TvN" secondAttribute="centerX" id="gJy-A5-yAd"/> | ||
| <constraint firstItem="hv4-PP-Jf1" firstAttribute="top" secondItem="pN4-rP-PRo" secondAttribute="bottom" constant="50" id="wBe-44-PYd"/> | ||
| <constraint firstItem="pN4-rP-PRo" firstAttribute="centerY" secondItem="xcy-PO-TvN" secondAttribute="centerY" id="yxa-HP-scf"/> | ||
| </constraints> | ||
| </view> | ||
| </subviews> | ||
| <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> | ||
| <constraints> | ||
| <constraint firstItem="xcy-PO-TvN" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="IC1-lg-mal"/> | ||
| <constraint firstItem="xcy-PO-TvN" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" constant="100" id="IbW-ur-RPO"/> | ||
| </constraints> | ||
| </view> | ||
| <connections> | ||
| <outlet property="customView" destination="xcy-PO-TvN" id="VbY-Zs-9Sw"/> | ||
| </connections> | ||
| </viewController> | ||
| <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> | ||
| </objects> | ||
| <point key="canvasLocation" x="140" y="362"/> | ||
| </scene> | ||
| </scenes> | ||
| </document> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ | |
|
|
||
| @interface ViewController : UIViewController | ||
|
|
||
| @property (nonatomic) UIImage *imageView; | ||
|
|
||
| @end | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,10 @@ | |
|
|
||
| #import <UIKit/UIKit.h> | ||
|
|
||
| @interface ViewController : UIViewController | ||
| @interface ViewController : UIViewController <UIImagePickerControllerDelegate, UINavigationControllerDelegate> | ||
|
|
||
| @property (strong, nonatomic) IBOutlet UIImageView *imageView; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should try to keep all |
||
|
|
||
|
|
||
|
|
||
| @end | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider making this more general.
didTapCommentButtoninstead ofdidSelectColor.didSelectColorimplies intent, and the protocol should be oblivious to intent.