Git Product home page Git Product logo

unit-2-hw-0's Introduction

Pick-a-pic - a simple camera roll selector.

Using the UIImagePickerController class along with UINavigationControllerDelegate and UIImagePickerControllerDelegate, make a simple screen that allows you to select a photo from you camera roll and display it in an image view. Use the following gif as a reference.

This part of the homework is only one screen. Create and configure an instance of UIImagePicker. Conform to the UIImagePickerControllerDelegate protocol. Implementing the protocol methods will provide you with the information that you need, including the selected image.

image

Social

This assignment involves creating a custom protocol and a custom view. Exciting! This is a simulation of how you would create interactive elements in a social media app (interactive meaning liking and commenting).

Your job is to create a custom view that contains 3 different buttons. A button to "like", a button to "comment", and a button to "share". When the user taps on one of the buttons, the view will send a corresponding message to its delegate. Depending on the button tapped, the main view should change its background color.

  • like button = blue
  • comment button = green
  • share button = red

reference

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:
- (void)socialMediaViewDidTapLikeButton:(SocialMediaView *)view;
- (void)socialMediaViewDidTapCommentButton:(SocialMediaView *)view;
- (void)socialMediaViewDidTapShareButton:(SocialMediaView *)view;
  1. The views only responsiblity is receiving the button actions and sending a message to the delegate. Not other logic should go in your custom view .m file.

How to create a custom view

Creating a custom view is really no different than creating a custom view controller.

Create a new file that is a subclass of UIView

Make sure you set the class in storyboard.

unit-2-hw-0's People

Contributors

mikekavouras avatar xiulanshi avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.