Coder Social home page Coder Social logo

ca-archived / ios-nbuimagepicker Goto Github PK

View Code? Open in Web Editor NEW
193.0 28.0 48.0 11.47 MB

Modular image picker with Simulator-compatible AVFondation camera, assets library, filters and more.

Home Page: http://cyberagent.github.io/iOS-NBUImagePicker

License: Apache License 2.0

Objective-C 98.96% Ruby 0.93% Shell 0.11%
ios image-picker assetslibrary gallery modular filter gpuimage

ios-nbuimagepicker's Introduction

NBUImagePicker

Platform: iOS Version: 1.6.0 License: Apache 2.0 Dependency Status Build Status

Modular and fully customizable UIImagePickerController replacement with Simulator-compatible AVFondation camera, AssetsLibrary and custom directory assets' browser, and image cropping, filters and gallery.

Uses NBUCore and NBUKit. Supports NBULog.

Demo

A demo project is included in the repository.

Features

Image Picker

Block-based UIImagePickerController replacement with as many/few features as you need.

Screenshot 1

Enable/disable modules or use them stand-alone.

Camera

Customizable AVFoundation-based camera UIView.

Can be embeded into any superview, custom UIViewController or used along NBUCameraViewController. It even takes mock pictures in the iOS Simulator!

Screenshot 2 Screenshot 3

Assets

Multiple classes of all three MVC categories to simplify access to AssetsLibrary while observing its change notifications to stay always in a valid state.

Also support for local assets: Images in custom directories that are displayed like regular Assets Library albums.

Screenshot 4 Screenshot 5

Image Editing

Customizable views and controllers to modify filter and crop images.

Screenshot 6

Uses filters from CoreImage and GPUImage and can be extended to other libraries as well.

Image Gallery

Image slideshow in development inspired by FGallery.

Screenshot 7

Customization

The main goal of NBUImagePicker is to be fully customizable and easy to extend.

Change element's sizes, position, customize picker workflow, add/remove/rename filters, localize for other languages, use cropping features from other libraries, etc.

Screenshot 9 Screenshot 10

Screenshot 8

Installation

Add the following to your CocoaPods' Podfile:

platform :ios, '8.0'
use_frameworks!

# Recommended to keep GPUImage up-to-date
pod 'GPUImage', :head

#pod 'NBUImagePicker'

# Optional for dynamic logging
pod 'NBULog'

# Optional for on-device log console
pod 'LumberjackConsole'

Stand-Alone Modules

Manually specify only the components you need:

pod 'NBUImagePicker/Camera'  # AVFoundation-based camera
pod 'NBUImagePicker/Assets'  # AssetsLibrary and custom path asset selection
pod 'NBUImagePicker/Filters' # CoreImage and GPUImage filters' wrapping
pod 'NBUImagePicker/Image'   # Croping
pod 'NBUImagePicker/Gallery' # Image preview
pod 'NBUImagePicker/Picker'  # Combinations of the modules above except for filters

Documentation

http://cocoadocs.org/docsets/NBUImagePicker/

License

Copyright (c) 2012-2017 CyberAgent Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. 
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

ios-nbuimagepicker's People

Contributors

bcylin avatar nimitpattanasri avatar rivera-ernesto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ios-nbuimagepicker's Issues

Getting Couldn't load Nib named: NBUImagePickerController

Hi I am getting Couldn't load Nib named: NBUImagePickerController
when i call..

[NBUImagePickerController startPickerWithTarget:self
options:NBUImagePickerOptionStartWithCamera
nibName:nil
resultBlock:^(NSArray * mediaInfos)
{
}];

Customize NBUAssetsLibraryViewController in a non-storyboard project

First of all, thank you for making image picker so modular.
Currently I am trying to customize NBUAssetsLibraryViewController by subclassing it in a non-storyboard project.

My first attempt is to manually connect IBOutlet of objectTableView to a UIView which I put into a xib file (of NBUAssetsLibraryViewController's subclass). The table view of albums was shown as expected, but after I tap on each album nothing happens. I guess I have to connect IBAction somehow but have no idea where to perform it.

Is there an easy or the right way to customize NBUAssetsLibraryViewController for non-storyboard projects?

I am sorry to bother you with this non-bug issue, but I would appreciate if you can give any suggestion or relevant pointer to achieve this task.

Thank you.

Initialize NBUCameraView in viewDidAppear or viewDidLayoutSubviews

Currently I have an issue to configure NBUCameraView's bound. I use auto layout, and it seems to me view's bound is not determined until viewDidAppear or viewDidLayoutSubviews. However, I notice NBUCameraView is initialized in viewWillAppear which makes its bound incorrectly configured.

Is it possible to change this initialization behavior or to perform initialization manually?

Images count issue

Review the following code , in the picker class , gives me 3 images if i select 6 in the block as you increasing the index twice in the loop

This is my code where i am having an issue
id callback = ^(NSArray * images){

};

// Prepare result
NSMutableArray * result = _mediaInfos;
if (!_returnMediaInfoMode)
{
result = [NSMutableArray arrayWithCapacity:_mediaInfos.count];
for (NSUInteger index = 0; index < _mediaInfos.count; index++)
{
[result addObject:((NBUMediaInfo *)_mediaInfos[index++]).editedImage];
}
}

Come up with a clean way to configure not-yet loaded views' properties from controllers or Picker.

Currently only the most common properties can be directly configured from the Picker or its controllers without subclassing.

NBUCameraView, NBUCropView, etc., many more properties and some are "forwarded" from the controller but it will be ugly and hard to maintain to just reproduce every property there.

One possible solution would be to have a dictionary of keyPaths and values to be applied as views get loaded.

Related to #2.

Performing segue causes error of taking photo

Hi!
I'm trying to take photo using NBUCameraView and then push view in UINavigationController. But when i set currentFlashMode in AVCaptureFlashModeOn and take picture by following code:

- (IBAction)take:(id)sender {
    [self.cameraView takePicture:self];
    [self performSegueWithIdentifier:@"makePhotorem" sender:self];

I receive error:

Error: Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo=0x145e8b60 {NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x145de7a0 "The operation couldn’t be completed. (OSStatus error -12671.)", NSLocalizedFailureReason=An unknown error occurred (-12671)}

It's surprising that this error appear only when currentFlashMode set in AVCaptureFlashModeOn else it's ok.
I will be grateful for any help.

memory not release

before open picker, the app use memory 30m
then open the picker, select one image,then the view push to the filter view
memory use increase to 110m
then click cancel button on the left navigation to dismiss controller view
memory use 100m

the 70m(100m - 30m) memory use will never release.
did some one also had this problem?

'Pods-environment.h' file not found

I am trying run and install the project but I am having some difficulty

I updated CocoaPods, and run a pod install and a pod update
I open the workspace and attempt to compile but get the following error

NBUImagePicker/NBUImagePicker.h:23:9: fatal error: 'Pods-environment.h' file not found

import "Pods-environment.h"

I'm uncertain exactly what this error means, any help would be greatly appretiated

Thanks

Zoom Feature

How can i enable zoom in/out feature in NBUImagePicker?

Grey gradient background overlay app view after dismissing picker

I really love this picker but i'm having one issue that is a right pain.

iPhone 6 is 8.3

This happens on device and simulator.

Code:

NBUImagePickerOptions options = (
                                     NBUImagePickerOptionSingleImage |      // Single or multiple
                                     NBUImagePickerOptionReturnImages |     // Result Mode
                                     NBUImagePickerOptionStartWithPrompt |  // Start mode
                                     NBUImagePickerOptionDoNotSaveImages    // Save mode
                                     );
    [NBUImagePickerController startPickerWithTarget:self
                                            options:options
                                   customStoryboard:nil
                                        resultBlock:^(NSArray *imagesArray)
     {
         DebugLog(@"Count: %d", (int)imagesArray.count);
     }];

Steps to recreate:

  1. Launch Picker, choose "Take a picture"
  2. Press the Cancel button top left.
  3. Picker dismisses, gradient overlay instantly added over top of screen. See screenshot.

ios simulator screen shot 17 jun 2015 11 27 20

This only happens on the "Take a picture" option. "Choose an image" seems to be fine.

Thanks

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.