All Projects → iosdec → UIMediaAlertController

iosdec / UIMediaAlertController

Licence: MIT license
UIAlertController extension for selecting images.

Programming Languages

objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to UIMediaAlertController

Realm Loginkit
A generic interface for logging in to Realm Mobile Platform apps
Stars: ✭ 70 (+268.42%)
Mutual labels:  uiviewcontroller
Rrviewcontrollerextension
UINavigationBar appearance management, memory leak detection, convenient UIViewController property and methods
Stars: ✭ 133 (+600%)
Mutual labels:  uiviewcontroller
Lnpopupcontroller
LNPopupController is a framework for presenting view controllers as popups of other view controllers, much like the Apple Music and Podcasts apps.
Stars: ✭ 2,807 (+14673.68%)
Mutual labels:  uiviewcontroller
Panslip
Use PanGesture to dismiss view on UIViewController and UIView
Stars: ✭ 93 (+389.47%)
Mutual labels:  uiviewcontroller
Xlbubbletransition
iOS ViewController间切换的转场动画
Stars: ✭ 127 (+568.42%)
Mutual labels:  uiviewcontroller
Lgsidemenucontroller
iOS view controller which manages left and right side views
Stars: ✭ 1,856 (+9668.42%)
Mutual labels:  uiviewcontroller
Gknavigationbarviewcontroller
iOS自定义导航栏-导航栏联动
Stars: ✭ 637 (+3252.63%)
Mutual labels:  uiviewcontroller
KeyCommandAlertController
UIAlertController wrapper to add keyboard shortcuts easily
Stars: ✭ 16 (-15.79%)
Mutual labels:  uialertcontroller
Aicustomviewcontrollertransition
Easy and tidy way for creating custom UIViewController transitions for iOS
Stars: ✭ 130 (+584.21%)
Mutual labels:  uiviewcontroller
Jelly
🌊 - Jelly is a library for animated, non-interactive & interactive viewcontroller transitions and presentations with the focus on a simple and yet flexible API.
Stars: ✭ 2,319 (+12105.26%)
Mutual labels:  uiviewcontroller
Licensingviewcontroller
📃 UIViewController subclass with a simple API for displaying licensing information.
Stars: ✭ 107 (+463.16%)
Mutual labels:  uiviewcontroller
Swifty360player
iOS 360-degree video player streaming from an AVPlayer.
Stars: ✭ 118 (+521.05%)
Mutual labels:  uiviewcontroller
Statefulviewcontroller
Placeholder views based on content, loading, error or empty states
Stars: ✭ 2,139 (+11157.89%)
Mutual labels:  uiviewcontroller
Swiftassetspickercontroller
A simple assets picker controller based on iOS 8 Photos framework. Supports iCloud photos and videos. It's written in Swift.
Stars: ✭ 81 (+326.32%)
Mutual labels:  uiviewcontroller
KOAlertController
KOAlertController custom alert controller, alternative default UIAlertController
Stars: ✭ 36 (+89.47%)
Mutual labels:  uialertcontroller
Splarkcontroller
Custom transition between controllers. Settings controller for your iOS app.
Stars: ✭ 693 (+3547.37%)
Mutual labels:  uiviewcontroller
Djsemimodalviewcontroller
Simple semi modal presentation dialog with stacked content
Stars: ✭ 137 (+621.05%)
Mutual labels:  uiviewcontroller
AutoInsetter
📐 Easily provide custom view controller auto-insetting
Stars: ✭ 13 (-31.58%)
Mutual labels:  uiviewcontroller
SPLarkController
Custom transition between controllers. Settings controller for your iOS app.
Stars: ✭ 967 (+4989.47%)
Mutual labels:  uiviewcontroller
Smileviewcontroller
UIViewController which allows to detect smile in real time.
Stars: ✭ 189 (+894.74%)
Mutual labels:  uiviewcontroller

UIMediaAlertController

UIAlertController extension for selecting images / videos.
Written in Objective-C.

Created By: Declan Land

Features

  • Completion handlers
  • Ease of use
  • Media Preview
  • Customisable

Screenshot


Installation

Download the contents of this repo and add these files to your project:

UIMediaAlertController.h
UIMediaAlertController.m
UIMedia.h
UIMedia.m

Include these frameworks in your project:

#import <AVFoundation/AVFoundation.h>
#import <MobileCoreServices/MobileCoreServices.h>
#import <ImageIO/ImageIO.h>

Usage

First, import the UIMediaAlertController.h file into the place you want to use it:

#import "UIMediaAlertController.h"

There are 2 methods of using the UIMediaAlertController:

  • Shared Instance
  • Stored Property

The benefits of using the shared instance is that it's really simple to call, and that the same UIMedia object is used throughout the app - unless you call: [UIMediaAlertController resetMedia]; For example:

[UIMediaAlertController presentWithType:MediaTypeImage picked:^{
   // Retreive global media by using:
   UIMedia *media = [UIMediaAlertController media];
   // Reset global media:
   [UIMediaAlertController resetMedia];
}];

The other method, is storing the UIMediaAlertController property in your header file MyViewController.h like so:

//	MyViewController.h

#import "UIMediaAlertController.h"

@implementation MyViewController : UIViewController

@property (strong, nonatomic) UIMediaAlertController *uimac;

@end

MyViewController.m":

@implementation MyViewController

- (IBAction)chooseImageButtonClicked:(UIButton *)sender {
   self.uimac = [[UIMediaAlertController alloc] init];
   [self.uimac presentWithType:MediaTypeImage picked:^{
	// get media:
	UIMedia *media = self.uimac.media;
	// resent media:
	[self.uimac resetMedia];
   }];
}

@end
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].