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
Binary file added .DS_Store
Binary file not shown.
Binary file added PartTwo/.DS_Store
Binary file not shown.
11 changes: 11 additions & 0 deletions PartTwo/PartTwo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
5D424DC91BA9FA270083E87F /* CustomView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D424DC81BA9FA270083E87F /* CustomView.m */; settings = {ASSET_TAGS = (); }; };
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 */; };
Expand Down Expand Up @@ -35,6 +36,9 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
5D424DC71BA9FA270083E87F /* CustomView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomView.h; sourceTree = "<group>"; };
5D424DC81BA9FA270083E87F /* CustomView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomView.m; sourceTree = "<group>"; };
5D424DCA1BAA055C0083E87F /* SocialMediaDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SocialMediaDelegate.h; sourceTree = "<group>"; };
8DD103441BA66E0900CE483B /* PartTwo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PartTwo.app; sourceTree = BUILT_PRODUCTS_DIR; };
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>"; };
Expand Down Expand Up @@ -103,8 +107,11 @@
children = (
8DD1034A1BA66E0900CE483B /* AppDelegate.h */,
8DD1034B1BA66E0900CE483B /* AppDelegate.m */,
5D424DCA1BAA055C0083E87F /* SocialMediaDelegate.h */,
8DD1034D1BA66E0900CE483B /* ViewController.h */,
8DD1034E1BA66E0900CE483B /* ViewController.m */,
5D424DC71BA9FA270083E87F /* CustomView.h */,
5D424DC81BA9FA270083E87F /* CustomView.m */,
8DD103501BA66E0900CE483B /* Main.storyboard */,
8DD103531BA66E0900CE483B /* Assets.xcassets */,
8DD103551BA66E0900CE483B /* LaunchScreen.storyboard */,
Expand Down Expand Up @@ -271,6 +278,7 @@
buildActionMask = 2147483647;
files = (
8DD1034F1BA66E0900CE483B /* ViewController.m in Sources */,
5D424DC91BA9FA270083E87F /* CustomView.m in Sources */,
8DD1034C1BA66E0900CE483B /* AppDelegate.m in Sources */,
8DD103491BA66E0900CE483B /* main.m in Sources */,
);
Expand Down Expand Up @@ -498,6 +506,7 @@
8DD103731BA66E0900CE483B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
8DD103741BA66E0900CE483B /* Build configuration list for PBXNativeTarget "PartTwoTests" */ = {
isa = XCConfigurationList;
Expand All @@ -506,6 +515,7 @@
8DD103761BA66E0900CE483B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
8DD103771BA66E0900CE483B /* Build configuration list for PBXNativeTarget "PartTwoUITests" */ = {
isa = XCConfigurationList;
Expand All @@ -514,6 +524,7 @@
8DD103791BA66E0900CE483B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
</Bucket>
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DD103431BA66E0900CE483B"
BuildableName = "PartTwo.app"
BlueprintName = "PartTwo"
ReferencedContainer = "container:PartTwo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DD1035C1BA66E0900CE483B"
BuildableName = "PartTwoTests.xctest"
BlueprintName = "PartTwoTests"
ReferencedContainer = "container:PartTwo.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DD103671BA66E0900CE483B"
BuildableName = "PartTwoUITests.xctest"
BlueprintName = "PartTwoUITests"
ReferencedContainer = "container:PartTwo.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DD103431BA66E0900CE483B"
BuildableName = "PartTwo.app"
BlueprintName = "PartTwo"
ReferencedContainer = "container:PartTwo.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DD103431BA66E0900CE483B"
BuildableName = "PartTwo.app"
BlueprintName = "PartTwo"
ReferencedContainer = "container:PartTwo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DD103431BA66E0900CE483B"
BuildableName = "PartTwo.app"
BlueprintName = "PartTwo"
ReferencedContainer = "container:PartTwo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>PartTwo.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>8DD103431BA66E0900CE483B</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>8DD1035C1BA66E0900CE483B</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>8DD103671BA66E0900CE483B</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
76 changes: 73 additions & 3 deletions PartTwo/PartTwo/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,25 +1,95 @@
<?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"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</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="Jc2-9t-8NN">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Auv-mP-Itf" customClass="CustomView">
<rect key="frame" x="200" y="188" width="200" height="225"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ok6-nt-OzM">
<rect key="frame" x="77" y="98" width="46" height="30"/>
<state key="normal" title="Like"/>
<connections>
<action selector="likeButtonTapped:" destination="Auv-mP-Itf" eventType="touchUpInside" id="KfE-B4-7w0"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zV2-Sc-15a">
<rect key="frame" x="77" y="28" width="46" height="30"/>
<state key="normal" title="Comment"/>
<connections>
<action selector="commentButtonTapped:" destination="Auv-mP-Itf" eventType="touchUpInside" id="bhG-f6-Pl0"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="V8t-2X-KyW">
<rect key="frame" x="77" y="168" width="46" height="30"/>
<state key="normal" title="Share"/>
<connections>
<action selector="shareButtonTapped:" destination="Auv-mP-Itf" eventType="touchUpInside" id="o6w-O0-OqQ"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="V8t-2X-KyW" firstAttribute="top" secondItem="Ok6-nt-OzM" secondAttribute="bottom" constant="40" id="ES0-3K-O5s"/>
<constraint firstAttribute="width" constant="200" id="IWz-Ct-2Sz"/>
<constraint firstItem="Ok6-nt-OzM" firstAttribute="top" secondItem="Auv-mP-Itf" secondAttribute="top" constant="65" id="NL4-9i-aC9"/>
<constraint firstItem="Ok6-nt-OzM" firstAttribute="centerX" secondItem="Auv-mP-Itf" secondAttribute="centerX" id="QaT-kp-EQG"/>
<constraint firstItem="zV2-Sc-15a" firstAttribute="centerX" secondItem="Auv-mP-Itf" secondAttribute="centerX" id="TKt-vp-Ydb"/>
<constraint firstItem="Ok6-nt-OzM" firstAttribute="centerX" secondItem="Auv-mP-Itf" secondAttribute="centerX" id="YxT-vt-F2M"/>
<constraint firstItem="Ok6-nt-OzM" firstAttribute="top" secondItem="zV2-Sc-15a" secondAttribute="bottom" constant="40" id="b60-uD-Ato"/>
<constraint firstAttribute="height" constant="225" id="bi3-Ie-aqM"/>
<constraint firstItem="Ok6-nt-OzM" firstAttribute="centerY" secondItem="Auv-mP-Itf" secondAttribute="centerY" id="qNl-hO-wxB"/>
<constraint firstItem="V8t-2X-KyW" firstAttribute="centerX" secondItem="Auv-mP-Itf" secondAttribute="centerX" id="xQH-5r-lNG"/>
</constraints>
<variation key="default">
<mask key="constraints">
<exclude reference="NL4-9i-aC9"/>
<exclude reference="YxT-vt-F2M"/>
</mask>
</variation>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="Auv-mP-Itf" firstAttribute="centerY" secondItem="Jc2-9t-8NN" secondAttribute="centerY" id="1j4-FP-G16"/>
<constraint firstItem="Auv-mP-Itf" firstAttribute="centerX" secondItem="Jc2-9t-8NN" secondAttribute="centerX" id="VPs-bu-b7X"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="Jc2-9t-8NN" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" constant="-20" id="fTt-jp-BHm"/>
<constraint firstItem="Jc2-9t-8NN" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="topMargin" id="hId-DM-D2w"/>
<constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="Jc2-9t-8NN" secondAttribute="bottom" id="l2r-PI-f5n"/>
<constraint firstAttribute="trailingMargin" secondItem="Jc2-9t-8NN" secondAttribute="trailing" constant="-20" id="xd2-yx-VHA"/>
</constraints>
</view>
<connections>
<outlet property="backgroundView" destination="Jc2-9t-8NN" id="MEt-Mf-r0B"/>
<outlet property="customView" destination="Auv-mP-Itf" id="SYk-Fu-frs"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="245" y="312"/>
</scene>
</scenes>
</document>
16 changes: 16 additions & 0 deletions PartTwo/PartTwo/CustomView.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// CustomView.h
// PartTwo
//
// Created by Jackie Meggesto on 9/16/15.
// Copyright © 2015 Mike Kavouras. All rights reserved.
//

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

@interface CustomView : UIView

@property (nonatomic, weak) id<SocialMediaDelegate> delegate;

@end
26 changes: 26 additions & 0 deletions PartTwo/PartTwo/CustomView.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// CustomView.m
// PartTwo
//
// Created by Jackie Meggesto on 9/16/15.
// Copyright © 2015 Mike Kavouras. All rights reserved.
//

#import "CustomView.h"

@implementation CustomView

-(IBAction)commentButtonTapped:(id)sender {
[self.delegate socialMediaViewDidTapCommentButton:self];
}
-(IBAction)likeButtonTapped:(id)sender {
[self.delegate socialMediaViewDidTapLikeButton:self];
}
-(IBAction)shareButtonTapped:(id)sender {
[self.delegate socialMediaViewDidTapShareButton:self];
}




@end
19 changes: 19 additions & 0 deletions PartTwo/PartTwo/SocialMediaDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// SocialMediaDelegate.h
// PartTwo
//
// Created by Jackie Meggesto on 9/16/15.
// Copyright © 2015 Mike Kavouras. All rights reserved.
//

#import <Foundation/Foundation.h>
@class CustomView;

@protocol SocialMediaDelegate <NSObject>


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

@end
5 changes: 5 additions & 0 deletions PartTwo/PartTwo/ViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
//

#import <UIKit/UIKit.h>
#import "CustomView.h"
#import "SocialMediaDelegate.h"




@interface ViewController : UIViewController

Expand Down
Loading