Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions PartTwo/BackgroundColorViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// BackgroundColorViewController.h
// PartTwo
//
// Created by Kaisha Jones on 9/18/15.
// Copyright © 2015 Mike Kavouras. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface BackgroundColorViewController : UIViewController

@end
45 changes: 45 additions & 0 deletions PartTwo/BackgroundColorViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
//
// BackgroundColorViewController.m
// PartTwo
//
// Created by Kaisha Jones on 9/18/15.
// Copyright © 2015 Mike Kavouras. All rights reserved.
//

#import "BackgroundColorViewController.h"
#import "SecondaryView.h"
#import "SecondaryViewDelegate.h"

@interface BackgroundColorViewController () <SecondaryViewDelegate>
@property (weak, nonatomic) IBOutlet UIView *secondaryViewContainer;
@property (nonatomic) SecondaryView *secondaryView;

@end

@implementation BackgroundColorViewController

- (void)viewDidLoad {
[super viewDidLoad];

NSArray *views = [[NSBundle mainBundle] loadNibNamed:@"SecondaryView" owner:self options:nil];
self.secondaryView = [views firstObject];

[self.secondaryViewContainer addSubview:self.secondaryView];
self.secondaryView.frame = self.secondaryViewContainer.bounds;

self.secondaryView.delegate = self;

}

- (void)socialMediaViewDidTapLikeButton:(SecondaryView *)view {
self.view.backgroundColor = [UIColor blueColor];
}
- (void)socialMediaViewDidTapCommentButton:(SecondaryView *)view {
self.view.backgroundColor = [UIColor greenColor];
}
- (void)socialMediaViewDidTapShareButton:(SecondaryView *)view{
self.view.backgroundColor = [UIColor redColor];
}

@end

27 changes: 21 additions & 6 deletions PartTwo/PartTwo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
/* Begin PBXBuildFile section */
8DD103491BA66E0900CE483B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DD103481BA66E0900CE483B /* main.m */; };
8DD1034C1BA66E0900CE483B /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DD1034B1BA66E0900CE483B /* AppDelegate.m */; };
8DD1034F1BA66E0900CE483B /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DD1034E1BA66E0900CE483B /* ViewController.m */; };
8DD103521BA66E0900CE483B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8DD103501BA66E0900CE483B /* Main.storyboard */; };
8DD103541BA66E0900CE483B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8DD103531BA66E0900CE483B /* Assets.xcassets */; };
8DD103571BA66E0900CE483B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8DD103551BA66E0900CE483B /* LaunchScreen.storyboard */; };
8DD103621BA66E0900CE483B /* PartTwoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DD103611BA66E0900CE483B /* PartTwoTests.m */; };
8DD1036D1BA66E0900CE483B /* PartTwoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DD1036C1BA66E0900CE483B /* PartTwoUITests.m */; };
A4C049F41BACB47600FA5B3F /* BackgroundColorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A4C049F31BACB47600FA5B3F /* BackgroundColorViewController.m */; };
A4C049F71BACB6B600FA5B3F /* SecondaryView.m in Sources */ = {isa = PBXBuildFile; fileRef = A4C049F61BACB6B600FA5B3F /* SecondaryView.m */; };
A4C049FC1BACB7F000FA5B3F /* SecondaryView.xib in Resources */ = {isa = PBXBuildFile; fileRef = A4C049FB1BACB7F000FA5B3F /* SecondaryView.xib */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -39,8 +41,6 @@
8DD103481BA66E0900CE483B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
8DD1034A1BA66E0900CE483B /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
8DD1034B1BA66E0900CE483B /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
8DD1034D1BA66E0900CE483B /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
8DD1034E1BA66E0900CE483B /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
8DD103511BA66E0900CE483B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
8DD103531BA66E0900CE483B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
8DD103561BA66E0900CE483B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
Expand All @@ -51,6 +51,12 @@
8DD103681BA66E0900CE483B /* PartTwoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PartTwoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
8DD1036C1BA66E0900CE483B /* PartTwoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PartTwoUITests.m; sourceTree = "<group>"; };
8DD1036E1BA66E0900CE483B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
A4C049F21BACB47600FA5B3F /* BackgroundColorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BackgroundColorViewController.h; path = ../BackgroundColorViewController.h; sourceTree = "<group>"; };
A4C049F31BACB47600FA5B3F /* BackgroundColorViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BackgroundColorViewController.m; path = ../BackgroundColorViewController.m; sourceTree = "<group>"; };
A4C049F51BACB6B600FA5B3F /* SecondaryView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecondaryView.h; sourceTree = "<group>"; };
A4C049F61BACB6B600FA5B3F /* SecondaryView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SecondaryView.m; sourceTree = "<group>"; };
A4C049FA1BACB7D100FA5B3F /* SecondaryViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SecondaryViewDelegate.h; path = ../SecondaryViewDelegate.h; sourceTree = "<group>"; };
A4C049FB1BACB7F000FA5B3F /* SecondaryView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = SecondaryView.xib; path = ../SecondaryView.xib; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -103,8 +109,12 @@
children = (
8DD1034A1BA66E0900CE483B /* AppDelegate.h */,
8DD1034B1BA66E0900CE483B /* AppDelegate.m */,
8DD1034D1BA66E0900CE483B /* ViewController.h */,
8DD1034E1BA66E0900CE483B /* ViewController.m */,
A4C049F21BACB47600FA5B3F /* BackgroundColorViewController.h */,
A4C049F31BACB47600FA5B3F /* BackgroundColorViewController.m */,
A4C049FA1BACB7D100FA5B3F /* SecondaryViewDelegate.h */,
A4C049F51BACB6B600FA5B3F /* SecondaryView.h */,
A4C049F61BACB6B600FA5B3F /* SecondaryView.m */,
A4C049FB1BACB7F000FA5B3F /* SecondaryView.xib */,
8DD103501BA66E0900CE483B /* Main.storyboard */,
8DD103531BA66E0900CE483B /* Assets.xcassets */,
8DD103551BA66E0900CE483B /* LaunchScreen.storyboard */,
Expand Down Expand Up @@ -244,6 +254,7 @@
buildActionMask = 2147483647;
files = (
8DD103571BA66E0900CE483B /* LaunchScreen.storyboard in Resources */,
A4C049FC1BACB7F000FA5B3F /* SecondaryView.xib in Resources */,
8DD103541BA66E0900CE483B /* Assets.xcassets in Resources */,
8DD103521BA66E0900CE483B /* Main.storyboard in Resources */,
);
Expand All @@ -270,9 +281,10 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8DD1034F1BA66E0900CE483B /* ViewController.m in Sources */,
A4C049F41BACB47600FA5B3F /* BackgroundColorViewController.m in Sources */,
8DD1034C1BA66E0900CE483B /* AppDelegate.m in Sources */,
8DD103491BA66E0900CE483B /* main.m in Sources */,
A4C049F71BACB6B600FA5B3F /* SecondaryView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -498,6 +510,7 @@
8DD103731BA66E0900CE483B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
8DD103741BA66E0900CE483B /* Build configuration list for PBXNativeTarget "PartTwoTests" */ = {
isa = XCConfigurationList;
Expand All @@ -506,6 +519,7 @@
8DD103761BA66E0900CE483B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
8DD103771BA66E0900CE483B /* Build configuration list for PBXNativeTarget "PartTwoUITests" */ = {
isa = XCConfigurationList;
Expand All @@ -514,6 +528,7 @@
8DD103791BA66E0900CE483B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down
33 changes: 27 additions & 6 deletions PartTwo/PartTwo/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,25 +1,46 @@
<?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="8173.3" 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="8142"/>
</dependencies>
<scenes>
<!--View Controller-->
<!--Background Color View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
<viewController id="BYZ-38-t0r" customClass="BackgroundColorViewController" 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"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IC3-Vf-lzf" userLabel="SecondaryViewContainer">
<rect key="frame" x="95" y="189" width="225" height="275"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<accessibility key="accessibilityConfiguration" identifier=""/>
<constraints>
<constraint firstAttribute="height" constant="275" id="6bX-DY-FUN"/>
<constraint firstAttribute="width" constant="225" id="BUU-54-RLf"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="0.49305656339999998" green="0.794002133" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="IC3-Vf-lzf" firstAttribute="centerY" secondItem="8bC-Xf-vdC" secondAttribute="centerY" constant="-41.5" id="H4L-ax-x2l"/>
<constraint firstItem="IC3-Vf-lzf" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="nmQ-ne-MzA"/>
</constraints>
</view>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina55"/>
<connections>
<outlet property="secondaryViewContainer" destination="IC3-Vf-lzf" id="9xp-Ty-lw9"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="245" y="312"/>
</scene>
</scenes>
</document>
15 changes: 15 additions & 0 deletions PartTwo/PartTwo/SecondaryView.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// SecondaryView.h
// PartTwo
//
// Created by Kaisha Jones on 9/18/15.
// Copyright © 2015 Mike Kavouras. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "SecondaryViewDelegate.h"

@interface SecondaryView : UIView
@property (nonatomic, weak) id <SecondaryViewDelegate> delegate;

@end
25 changes: 25 additions & 0 deletions PartTwo/PartTwo/SecondaryView.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// SecondaryView.m
// PartTwo
//
// Created by Kaisha Jones on 9/18/15.
// Copyright © 2015 Mike Kavouras. All rights reserved.
//

#import "SecondaryView.h"

@implementation SecondaryView

- (IBAction)likeButton:(UIButton *)sender {
[self.delegate socialMediaViewDidTapLikeButton:self];
}

- (IBAction)commentButton:(UIButton *)sender {
[self.delegate socialMediaViewDidTapCommentButton:self];
}

- (IBAction)shareButton:(UIButton *)sender {
[self.delegate socialMediaViewDidTapShareButton:self];
}

@end
15 changes: 0 additions & 15 deletions PartTwo/PartTwo/ViewController.h

This file was deleted.

27 changes: 0 additions & 27 deletions PartTwo/PartTwo/ViewController.m

This file was deleted.

53 changes: 53 additions & 0 deletions PartTwo/SecondaryView.xib
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8173.3" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8142"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="SecondaryView">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="LJJ-CG-wTq">
<rect key="frame" x="267" y="285" width="67" height="30"/>
<state key="normal" title="Comment">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="commentButton:" destination="iN0-l3-epB" eventType="touchUpInside" id="ybc-iy-qnp"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Oxi-5A-uhI">
<rect key="frame" x="281" y="365" width="40" height="30"/>
<state key="normal" title="Share">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="shareButton:" destination="iN0-l3-epB" eventType="touchUpInside" id="fkI-sc-Ehj"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Odo-UZ-KQI">
<rect key="frame" x="286" y="205" width="30" height="30"/>
<state key="normal" title="Like">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="likeButton:" destination="iN0-l3-epB" eventType="touchUpInside" id="SzO-fv-BqT"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.49305656339965453" green="0.79400213299021671" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="Odo-UZ-KQI" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" constant="1" id="5TU-KZ-cKr"/>
<constraint firstItem="LJJ-CG-wTq" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="KUC-GE-VfT"/>
<constraint firstItem="Odo-UZ-KQI" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" constant="-80" id="KyK-s0-rIH"/>
<constraint firstItem="LJJ-CG-wTq" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="RYK-gm-9J5"/>
<constraint firstItem="Oxi-5A-uhI" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" constant="80" id="bsn-Mu-JGO"/>
<constraint firstItem="Oxi-5A-uhI" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" constant="1" id="p2M-nH-X7h"/>
</constraints>
</view>
</objects>
</document>
21 changes: 21 additions & 0 deletions PartTwo/SecondaryViewDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// SecondaryViewDelegate.h
// PartTwo
//
// Created by Kaisha Jones on 9/18/15.
// Copyright © 2015 Mike Kavouras. All rights reserved.
//

#import <Foundation/Foundation.h>

// must set @class instead of property or error

@class SecondaryView;

@protocol SecondaryViewDelegate <NSObject>

- (void)socialMediaViewDidTapLikeButton:(SecondaryView *)view;
- (void)socialMediaViewDidTapCommentButton:(SecondaryView *)view;
- (void)socialMediaViewDidTapShareButton:(SecondaryView *)view;

@end
13 changes: 13 additions & 0 deletions PickAPic/CameraRollViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// CameraRollViewController.h
// PickAPic
//
// Created by Kaisha Jones on 9/18/15.
// Copyright © 2015 Mike Kavouras. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface CameraRollViewController : UIViewController

@end
Loading