diff --git a/PartTwo/PartTwo.xcodeproj/project.pbxproj b/PartTwo/PartTwo.xcodeproj/project.pbxproj index 5582517..d6ae243 100644 --- a/PartTwo/PartTwo.xcodeproj/project.pbxproj +++ b/PartTwo/PartTwo.xcodeproj/project.pbxproj @@ -15,6 +15,7 @@ 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 */; }; + F79225A51BACC92F0039E347 /* SocialMediaView.m in Sources */ = {isa = PBXBuildFile; fileRef = F79225A41BACC92F0039E347 /* SocialMediaView.m */; settings = {ASSET_TAGS = (); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -51,6 +52,9 @@ 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 = ""; }; 8DD1036E1BA66E0900CE483B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + F79225A31BACC92F0039E347 /* SocialMediaView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SocialMediaView.h; sourceTree = ""; }; + F79225A41BACC92F0039E347 /* SocialMediaView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SocialMediaView.m; sourceTree = ""; }; + F79225A61BACC9920039E347 /* SocialMediaBackgroundProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SocialMediaBackgroundProtocol.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -105,6 +109,9 @@ 8DD1034B1BA66E0900CE483B /* AppDelegate.m */, 8DD1034D1BA66E0900CE483B /* ViewController.h */, 8DD1034E1BA66E0900CE483B /* ViewController.m */, + F79225A31BACC92F0039E347 /* SocialMediaView.h */, + F79225A41BACC92F0039E347 /* SocialMediaView.m */, + F79225A61BACC9920039E347 /* SocialMediaBackgroundProtocol.h */, 8DD103501BA66E0900CE483B /* Main.storyboard */, 8DD103531BA66E0900CE483B /* Assets.xcassets */, 8DD103551BA66E0900CE483B /* LaunchScreen.storyboard */, @@ -272,6 +279,7 @@ files = ( 8DD1034F1BA66E0900CE483B /* ViewController.m in Sources */, 8DD1034C1BA66E0900CE483B /* AppDelegate.m in Sources */, + F79225A51BACC92F0039E347 /* SocialMediaView.m in Sources */, 8DD103491BA66E0900CE483B /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -498,6 +506,7 @@ 8DD103731BA66E0900CE483B /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; 8DD103741BA66E0900CE483B /* Build configuration list for PBXNativeTarget "PartTwoTests" */ = { isa = XCConfigurationList; @@ -506,6 +515,7 @@ 8DD103761BA66E0900CE483B /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; 8DD103771BA66E0900CE483B /* Build configuration list for PBXNativeTarget "PartTwoUITests" */ = { isa = XCConfigurationList; @@ -514,6 +524,7 @@ 8DD103791BA66E0900CE483B /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/PartTwo/PartTwo.xcodeproj/project.xcworkspace/xcuserdata/christella.xcuserdatad/UserInterfaceState.xcuserstate b/PartTwo/PartTwo.xcodeproj/project.xcworkspace/xcuserdata/christella.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..2769e26 Binary files /dev/null and b/PartTwo/PartTwo.xcodeproj/project.xcworkspace/xcuserdata/christella.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/PartTwo/PartTwo.xcodeproj/xcuserdata/christella.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/PartTwo/PartTwo.xcodeproj/xcuserdata/christella.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..fe2b454 --- /dev/null +++ b/PartTwo/PartTwo.xcodeproj/xcuserdata/christella.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,5 @@ + + + diff --git a/PartTwo/PartTwo.xcodeproj/xcuserdata/christella.xcuserdatad/xcschemes/PartTwo.xcscheme b/PartTwo/PartTwo.xcodeproj/xcuserdata/christella.xcuserdatad/xcschemes/PartTwo.xcscheme new file mode 100644 index 0000000..7b83b68 --- /dev/null +++ b/PartTwo/PartTwo.xcodeproj/xcuserdata/christella.xcuserdatad/xcschemes/PartTwo.xcscheme @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PartTwo/PartTwo.xcodeproj/xcuserdata/christella.xcuserdatad/xcschemes/xcschememanagement.plist b/PartTwo/PartTwo.xcodeproj/xcuserdata/christella.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..8d9c097 --- /dev/null +++ b/PartTwo/PartTwo.xcodeproj/xcuserdata/christella.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,32 @@ + + + + + SchemeUserState + + PartTwo.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 8DD103431BA66E0900CE483B + + primary + + + 8DD1035C1BA66E0900CE483B + + primary + + + 8DD103671BA66E0900CE483B + + primary + + + + + diff --git a/PartTwo/PartTwo/Base.lproj/Main.storyboard b/PartTwo/PartTwo/Base.lproj/Main.storyboard index f56d2f3..4c4c101 100644 --- a/PartTwo/PartTwo/Base.lproj/Main.storyboard +++ b/PartTwo/PartTwo/Base.lproj/Main.storyboard @@ -1,13 +1,14 @@ - + - + + - + @@ -15,11 +16,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PartTwo/PartTwo/SocialMediaBackgroundProtocol.h b/PartTwo/PartTwo/SocialMediaBackgroundProtocol.h new file mode 100644 index 0000000..158396e --- /dev/null +++ b/PartTwo/PartTwo/SocialMediaBackgroundProtocol.h @@ -0,0 +1,15 @@ +// +// SocialMediaBackgroundProtocol.h +// PartTwo +// +// Created by Christella on 9/18/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import + +@protocol SocialMediaBackgroundProtocol + +-(void)colorSelection:(UIColor *)selectedColor; + +@end diff --git a/PartTwo/PartTwo/SocialMediaView.h b/PartTwo/PartTwo/SocialMediaView.h new file mode 100644 index 0000000..7735a0d --- /dev/null +++ b/PartTwo/PartTwo/SocialMediaView.h @@ -0,0 +1,18 @@ +// +// SocialMediaView.h +// PartTwo +// +// Created by Christella on 9/18/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import + +@interface SocialMediaView : UIView + + + + + + +@end diff --git a/PartTwo/PartTwo/SocialMediaView.m b/PartTwo/PartTwo/SocialMediaView.m new file mode 100644 index 0000000..9368ac3 --- /dev/null +++ b/PartTwo/PartTwo/SocialMediaView.m @@ -0,0 +1,29 @@ +// +// SocialMediaView.m +// PartTwo +// +// Created by Christella on 9/18/15. +// Copyright © 2015 Mike Kavouras. All rights reserved. +// + +#import "SocialMediaView.h" +#import "SocialMediaBackgroundProtocol.h" + + + +@implementation SocialMediaView + + + +#pragma mark - Colors Delegate + +-(void)colorSelection:(UIColor *)selectedColor { + + SocialMediaView *socialmediaview = [[SocialMediaView alloc] init]; + + socialmediaview.backgroundColor = selectedColor; + +} + + +@end diff --git a/PartTwo/PartTwo/ViewController.h b/PartTwo/PartTwo/ViewController.h index cb5d98b..e852556 100644 --- a/PartTwo/PartTwo/ViewController.h +++ b/PartTwo/PartTwo/ViewController.h @@ -7,9 +7,12 @@ // #import +#import "SocialMediaBackgroundProtocol.h" + @interface ViewController : UIViewController +@property (nonatomic,weak) id delegate; @end diff --git a/PartTwo/PartTwo/ViewController.m b/PartTwo/PartTwo/ViewController.m index adca251..8f17628 100644 --- a/PartTwo/PartTwo/ViewController.m +++ b/PartTwo/PartTwo/ViewController.m @@ -8,20 +8,26 @@ #import "ViewController.h" -@interface ViewController () + +@interface ViewController () @end @implementation ViewController -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. +- (IBAction)commentButtonTapped:(id)sender { + [self.delegate colorSelection:[UIColor greenColor]]; +} + +- (IBAction)likeButtonTapped:(id)sender { + [self.delegate colorSelection:[UIColor blueColor]]; } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. +- (IBAction)shareButtonTapped:(id)sender { + [self.delegate colorSelection:[UIColor redColor]]; } + + + @end diff --git a/PickAPic/Default-568h@2x.png b/PickAPic/Default-568h@2x.png new file mode 100644 index 0000000..0891b7a Binary files /dev/null and b/PickAPic/Default-568h@2x.png differ diff --git a/PickAPic/PickAPic.xcodeproj/project.pbxproj b/PickAPic/PickAPic.xcodeproj/project.pbxproj index 049896b..bad459c 100644 --- a/PickAPic/PickAPic.xcodeproj/project.pbxproj +++ b/PickAPic/PickAPic.xcodeproj/project.pbxproj @@ -12,9 +12,10 @@ 8D1F73C71BA66AE50040D369 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D1F73C61BA66AE50040D369 /* ViewController.m */; }; 8D1F73CA1BA66AE50040D369 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8D1F73C81BA66AE50040D369 /* Main.storyboard */; }; 8D1F73CC1BA66AE50040D369 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8D1F73CB1BA66AE50040D369 /* Assets.xcassets */; }; - 8D1F73CF1BA66AE50040D369 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8D1F73CD1BA66AE50040D369 /* LaunchScreen.storyboard */; }; 8D1F73DA1BA66AE50040D369 /* PickAPicTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D1F73D91BA66AE50040D369 /* PickAPicTests.m */; }; 8D1F73E51BA66AE50040D369 /* PickAPicUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D1F73E41BA66AE50040D369 /* PickAPicUITests.m */; }; + F792255D1BACBEE90039E347 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F792255C1BACBEE90039E347 /* LaunchScreen.storyboard */; settings = {ASSET_TAGS = (); }; }; + F792255F1BACBF6F0039E347 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F792255E1BACBF6F0039E347 /* Default-568h@2x.png */; settings = {ASSET_TAGS = (); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -43,7 +44,6 @@ 8D1F73C61BA66AE50040D369 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 8D1F73C91BA66AE50040D369 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 8D1F73CB1BA66AE50040D369 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 8D1F73CE1BA66AE50040D369 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 8D1F73D01BA66AE50040D369 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 8D1F73D51BA66AE50040D369 /* PickAPicTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PickAPicTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 8D1F73D91BA66AE50040D369 /* PickAPicTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PickAPicTests.m; sourceTree = ""; }; @@ -51,6 +51,8 @@ 8D1F73E01BA66AE50040D369 /* PickAPicUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PickAPicUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 8D1F73E41BA66AE50040D369 /* PickAPicUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PickAPicUITests.m; sourceTree = ""; }; 8D1F73E61BA66AE50040D369 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + F792255C1BACBEE90039E347 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; + F792255E1BACBF6F0039E347 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -81,6 +83,7 @@ 8D1F73B31BA66AE50040D369 = { isa = PBXGroup; children = ( + F792255E1BACBF6F0039E347 /* Default-568h@2x.png */, 8D1F73BE1BA66AE50040D369 /* PickAPic */, 8D1F73D81BA66AE50040D369 /* PickAPicTests */, 8D1F73E31BA66AE50040D369 /* PickAPicUITests */, @@ -107,7 +110,7 @@ 8D1F73C61BA66AE50040D369 /* ViewController.m */, 8D1F73C81BA66AE50040D369 /* Main.storyboard */, 8D1F73CB1BA66AE50040D369 /* Assets.xcassets */, - 8D1F73CD1BA66AE50040D369 /* LaunchScreen.storyboard */, + F792255C1BACBEE90039E347 /* LaunchScreen.storyboard */, 8D1F73D01BA66AE50040D369 /* Info.plist */, 8D1F73BF1BA66AE50040D369 /* Supporting Files */, ); @@ -207,6 +210,7 @@ TargetAttributes = { 8D1F73BB1BA66AE50040D369 = { CreatedOnToolsVersion = 7.0; + DevelopmentTeam = 9WQ49EN2U5; }; 8D1F73D41BA66AE50040D369 = { CreatedOnToolsVersion = 7.0; @@ -243,7 +247,8 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 8D1F73CF1BA66AE50040D369 /* LaunchScreen.storyboard in Resources */, + F792255D1BACBEE90039E347 /* LaunchScreen.storyboard in Resources */, + F792255F1BACBF6F0039E347 /* Default-568h@2x.png in Resources */, 8D1F73CC1BA66AE50040D369 /* Assets.xcassets in Resources */, 8D1F73CA1BA66AE50040D369 /* Main.storyboard in Resources */, ); @@ -316,14 +321,6 @@ name = Main.storyboard; sourceTree = ""; }; - 8D1F73CD1BA66AE50040D369 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 8D1F73CE1BA66AE50040D369 /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -411,11 +408,14 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; INFOPLIST_FILE = PickAPic/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.2; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.mikekavouras.PickAPic; + PRODUCT_BUNDLE_IDENTIFIER = com.christelladolmo.PickAPic; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; }; name = Debug; }; @@ -423,11 +423,14 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; INFOPLIST_FILE = PickAPic/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.2; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.mikekavouras.PickAPic; + PRODUCT_BUNDLE_IDENTIFIER = com.christelladolmo.PickAPic; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; }; name = Release; }; diff --git a/PickAPic/PickAPic.xcodeproj/project.xcworkspace/xcuserdata/christella.xcuserdatad/UserInterfaceState.xcuserstate b/PickAPic/PickAPic.xcodeproj/project.xcworkspace/xcuserdata/christella.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..4abb338 Binary files /dev/null and b/PickAPic/PickAPic.xcodeproj/project.xcworkspace/xcuserdata/christella.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/PickAPic/PickAPic.xcodeproj/xcuserdata/christella.xcuserdatad/xcschemes/PickAPic.xcscheme b/PickAPic/PickAPic.xcodeproj/xcuserdata/christella.xcuserdatad/xcschemes/PickAPic.xcscheme new file mode 100644 index 0000000..72d7729 --- /dev/null +++ b/PickAPic/PickAPic.xcodeproj/xcuserdata/christella.xcuserdatad/xcschemes/PickAPic.xcscheme @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PickAPic/PickAPic.xcodeproj/xcuserdata/christella.xcuserdatad/xcschemes/xcschememanagement.plist b/PickAPic/PickAPic.xcodeproj/xcuserdata/christella.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..bb91a10 --- /dev/null +++ b/PickAPic/PickAPic.xcodeproj/xcuserdata/christella.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,32 @@ + + + + + SchemeUserState + + PickAPic.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 8D1F73BB1BA66AE50040D369 + + primary + + + 8D1F73D41BA66AE50040D369 + + primary + + + 8D1F73DF1BA66AE50040D369 + + primary + + + + + diff --git a/PickAPic/PickAPic/Base.lproj/Main.storyboard b/PickAPic/PickAPic/Base.lproj/Main.storyboard index f055f71..39f382b 100644 --- a/PickAPic/PickAPic/Base.lproj/Main.storyboard +++ b/PickAPic/PickAPic/Base.lproj/Main.storyboard @@ -1,8 +1,8 @@ - + - + @@ -16,8 +16,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PickAPic/PickAPic/Base.lproj/LaunchScreen.storyboard b/PickAPic/PickAPic/LaunchScreen.storyboard similarity index 84% rename from PickAPic/PickAPic/Base.lproj/LaunchScreen.storyboard rename to PickAPic/PickAPic/LaunchScreen.storyboard index 2e721e1..5a9c4a6 100644 --- a/PickAPic/PickAPic/Base.lproj/LaunchScreen.storyboard +++ b/PickAPic/PickAPic/LaunchScreen.storyboard @@ -1,7 +1,7 @@ - + - + diff --git a/PickAPic/PickAPic/ViewController.h b/PickAPic/PickAPic/ViewController.h index dee0930..b8a4d9e 100644 --- a/PickAPic/PickAPic/ViewController.h +++ b/PickAPic/PickAPic/ViewController.h @@ -8,7 +8,12 @@ #import -@interface ViewController : UIViewController +@interface ViewController : UIViewController + +@property (strong, nonatomic) IBOutlet UIImageView *imageView; + + +@property (strong, nonatomic) IBOutlet UIButton *cameraRoll; @end diff --git a/PickAPic/PickAPic/ViewController.m b/PickAPic/PickAPic/ViewController.m index acd6613..38f8a7b 100644 --- a/PickAPic/PickAPic/ViewController.m +++ b/PickAPic/PickAPic/ViewController.m @@ -15,4 +15,27 @@ @interface ViewController () @implementation ViewController + + +- (IBAction)cameraRollButtonTapped:(id)sender { + + UIImagePickerController *picker = [[UIImagePickerController alloc] init]; + picker.delegate = self; + picker.allowsEditing = YES; + picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; + + [self presentViewController:picker animated:YES completion:NULL]; +} + + + +- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { + + UIImage *chosenImage = info[UIImagePickerControllerEditedImage]; + self.imageView.image = chosenImage; + + [picker dismissViewControllerAnimated:YES completion:NULL]; + +} + @end diff --git a/README.md b/README.md index c32098d..e7b9178 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Your job is to create a custom view that contains 3 different buttons. A button ### Considerations 1) Your button actions are inside of the custom view .m file, not the view controller -2) The custom view should communicate to the view controller through protocol methods. The mothods are as follows: +2) The custom view should communicate to the view controller through protocol methods. The methods are as follows: ```objective-c - (void)socialMediaViewDidTapLikeButton:(SocialMediaView *)view; - (void)socialMediaViewDidTapCommentButton:(SocialMediaView *)view;