Coder Social home page Coder Social logo

mhvideophotogallery's Introduction

MHGallery

==================

MHGallery

bitcoin:1Lj45X69tPYAPqnZP2c9Ccs349fC2CEMQo

Podfile

platform :ios, '7.0'
pod 'MHVideoPhotoGallery'

Supported Videos

Youtube
Vimeo
Weblinks (.mov, .mp4, .mpv)

Supported Languages

DE,EN,ES,FR,HR,IT,PT,RU,DA,ZH-Hans

MHGalleryItem

+ (instancetype)itemWithURL:(NSString *)URLString thumbnailURL:(NSString*)thumbnailURL; //Thumbs are automatically generated for Videos. But you can set Thumb Images for GalleryTypeImage.
+ (instancetype)itemWithURL:(NSString*)URLString galleryType:(MHGalleryType)galleryType;
+ (instancetype)itemWithYoutubeVideoID:(NSString*)ID;
+ (instancetype)itemWithVimeoVideoID:(NSString*)ID;
+ (instancetype)itemWithImage:(UIImage*)image;

MHGalleryController

+(instancetype)galleryWithPresentationStyle:(MHGalleryViewMode)presentationStyle;

@property (nonatomic,assign) id<MHGalleryDelegate>              galleryDelegate;
@property (nonatomic,assign) id<MHGalleryDataSource>            dataSource;
@property (nonatomic,assign) BOOL                               autoplayVideos; //Default NO
@property (nonatomic,assign) NSInteger                          presentationIndex; //From which index you want to present the Gallery.
@property (nonatomic,strong) UIImageView                        *presentingFromImageView;
@property (nonatomic,strong) MHGalleryImageViewerViewController *imageViewerViewController;
@property (nonatomic,strong) MHOverviewController               *overViewViewController;
@property (nonatomic,strong) NSArray                            *galleryItems; //You can set an Array of GalleryItems or you can use the dataSource.
@property (nonatomic,strong) MHTransitionCustomization          *transitionCustomization; //Use transitionCustomization to Customize the GalleryControllers transitions
@property (nonatomic,strong) MHUICustomization                  *UICustomization; //Use UICustomization to Customize the GalleryControllers UI
@property (nonatomic,strong) MHTransitionPresentMHGallery       *interactivePresentationTransition;
@property (nonatomic,assign) MHGalleryViewMode                  presentationStyle;
@property (nonatomic,assign) UIStatusBarStyle                   preferredStatusBarStyleMH;

@property (nonatomic, copy) void (^finishedCallback)(NSUInteger currentIndex,UIImage *image,MHTransitionDismissMHGallery *interactiveTransition,MHGalleryViewMode viewMode);

UI Customization

@property (nonatomic)        UIBarStyle barStyle; //Default UIBarStyleDefault
@property (nonatomic,strong) UIColor *barTintColor; //Default nil
@property (nonatomic,strong) UIColor *barButtonsTintColor; //Default nil
@property (nonatomic,strong) UIColor *videoProgressTintColor; //Default Black
@property (nonatomic)        BOOL showMHShareViewInsteadOfActivityViewController; //Default YES
@property (nonatomic)        BOOL hideShare; //Default NO
@property (nonatomic)        BOOL useCustomBackButtonImageOnImageViewer; //Default YES
@property (nonatomic)        BOOL showOverView; //Default YES
@property (nonatomic)        MHBackButtonState backButtonState; //Default MHBackButtonStateWithBackArrow

@property (nonatomic,strong) UIBarButtonItem *customBarButtonItem; //A optional UIBarButtonItem displayed in the lower right corner. Default nil

@property (nonatomic,strong) UICollectionViewFlowLayout *overViewCollectionViewLayoutLandscape;
@property (nonatomic,strong) UICollectionViewFlowLayout *overViewCollectionViewLayoutPortrait;

-(void)setMHGalleryBackgroundColor:(UIColor*)color forViewMode:(MHGalleryViewMode)viewMode;
-(UIColor*)MHGalleryBackgroundColorForViewMode:(MHGalleryViewMode)viewMode;

Transition Customization

@property (nonatomic)       BOOL interactiveDismiss; //Default YES
@property (nonatomic)       BOOL dismissWithScrollGestureOnFirstAndLastImage;//Default YES
@property (nonatomic)       BOOL fixXValueForDismiss; //Default NO

Usage

UIImageView *imageView = [(ImageTableViewCell*)[tableView cellForRowAtIndexPath:indexPath] imageView];
        
MHGalleryItem *image1 = [MHGalleryItem itemWithURL:@"myImageURL" galleryType:MHGalleryTypeImage];
MHGalleryItem *image2 = [MHGalleryItem itemWithURL:@"myImageURL" galleryType:MHGalleryTypeImage];
MHGalleryItem *youtube = [MHGalleryItem itemWithYoutubeVideoID:@"myYoutubeID"];

NSArray *galleryData = @[image1,image2,youtube];
    
    MHGalleryController *gallery = [MHGalleryController galleryWithPresentationStyle:MHGalleryViewModeImageViewerNavigationBarShown];
gallery.galleryItems = galleryData;
gallery.presentingFromImageView = imageView;    
gallery.presentationIndex = indexPath.row;
        
__weak MHGalleryController *blockGallery = gallery;
       
gallery.finishedCallback = ^(NSUInteger currentIndex,UIImage *image,MHTransitionDismissMHGallery *interactiveTransition){
        
        NSIndexPath *newIndex = [NSIndexPath indexPathForRow:currentIndex inSection:0];
        
        [self.tableView scrollToRowAtIndexPath:newIndex atScrollPosition:UITableViewScrollPositionMiddle animated:NO];
        
        dispatch_async(dispatch_get_main_queue(), ^{
            UIImageView *imageView = [(ImageTableViewCell*)[self.tableView cellForRowAtIndexPath:newIndex] iv];
            [blockGallery dismissViewControllerAnimated:YES dismissImageView:imageView completion:nil];
        });

    };    
[self presentMHGalleryController:gallery animated:YES completion:nil];

Dismiss Video (Like Paper App)

alt tag

Dismiss Image (Like Paper App)

alt tag

Dismiss at the end or start on ScrollDirection (Like Paper App)

alt tag

OverView interactive (dismiss & present)

alt tag

Share

alt tag

OverView

alt tag

mhvideophotogallery's People

Contributors

bitdeli-chef avatar forryshih avatar gnatok avatar guillermomuntaner avatar jakemarsh avatar loevdahl avatar m1entus avatar mariohahn avatar oanhof avatar plu avatar raho avatar zhangao0086 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  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

mhvideophotogallery's Issues

errors

Undefined symbols for architecture i386:
"_AVMakeRectWithAspectRatioInsideRect", referenced from:
-[MHTransitionShowOverView animateTransition:] in MHTransitionShowOverView.o
-[MHTransitionShowOverView startInteractiveTransition:] in MHTransitionShowOverView.o
-[MHTransitionShowShareView animateTransition:] in MHTransitionShowShareView.o
-[MHTransitionDismissMHGallery animateTransition:] in MHTransitionDismissMHGallery.o
-[MHTransitionDismissMHGallery startInteractiveTransition:] in MHTransitionDismissMHGallery.o
-[MHImageViewController centerImageView] in MHGalleryImageViewerViewController.o
"_CMTimeGetSeconds", referenced from:
___54-[MHGallerySharedManager createThumbURL:successBlock:]_block_invoke in MHGallerySharedManager.o
"_CMTimeMakeWithSeconds", referenced from:
___54-[MHGallerySharedManager createThumbURL:successBlock:]_block_invoke in MHGallerySharedManager.o
"_MPMoviePlayerLoadStateDidChangeNotification", referenced from:
-[MHImageViewController removeAllMoviePlayerViewsAndNotifications] in MHGalleryImageViewerViewController.o
-[MHImageViewController addMoviePlayerToViewWithURL:] in MHGalleryImageViewerViewController.o
"_MPMoviePlayerPlaybackDidFinishNotification", referenced from:
-[MHImageViewController removeAllMoviePlayerViewsAndNotifications] in MHGalleryImageViewerViewController.o
-[MHImageViewController addMoviePlayerToViewWithURL:] in MHGalleryImageViewerViewController.o
"_MPMoviePlayerPlaybackStateDidChangeNotification", referenced from:
-[MHImageViewController removeAllMoviePlayerViewsAndNotifications] in MHGalleryImageViewerViewController.o
"OBJC_CLASS$_AVAssetImageGenerator", referenced from:
objc-class-ref in MHGallerySharedManager.o
"OBJC_CLASS$_AVURLAsset", referenced from:
objc-class-ref in MHGallerySharedManager.o
"OBJC_CLASS$_MPMoviePlayerController", referenced from:
objc-class-ref in MHGalleryImageViewerViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

setImageForMHGalleryItem:imageType:successBlock: unrecognized

Hi,

I try to display an image with your gallery but i always have this error :
-[UIImageView setImageForMHGalleryItem:imageType:successBlock:]: unrecognized selector sent to instance

My code looks like this :
capture decran 2014-06-05 a 18 32 11

Any idea how I can fix this issue please ?

Rotation and dismissal

When rotating the image view to landscape, swiping to dismiss causes the image viewer to revert to portrait, but then nothing occurs. Performing a second swipe successfully dismisses the image. If you select the same image again the image viewer is displayed in landscape but the layout is a little off. Occurs on both iPhone and iPad.

Video: http://quick.as/4kqltaD3

Status bar

MHVideoPhotoGallery causes issue with the status bar of the presenting controller. The two main issues I'm having:

  1. It doesn't take into account if the status bar is already hidden. If the status bar is hidden in the presenting controller, MHVideoPhotoGallery makes it appear again (with the side effect of overlapping the navigation bar on the first image).
  2. Because of 1., when MHVideoPhotoGallery is dismissed, the status bar is now visible. The only way to hide it is to first set it to visible, then to hidden again in the dismiss block, but this causes an unwanted visible effect.
  3. If the original status bar color was light, the color gets set to default. Similar to 2, setting it back in the dismiss block causes an unwanted visible effect.

I think if the status bar is already hidden, the MHVideoPhotoGallery should also keep it hidden. Also, it should either a) restore the status bar to the original state before the dismiss block is called, or provide a willDismiss callback that allows the user to set things back before MHVideoPhotoGallery is dismissed to prevent the visible effects.

small issue with sharing

Hello
first i want to congratulate you for this excellent piece of work. the coding is excellent.

I only found 1 issue so far.
if you go first to 1st tab," CollectionInTable", and select the first image on the first cell and tap on the share icon you will see the image to share correctly.
Now tap cancel and go back to the local view tab. Select an album and then an image.Tap share. Instead of the image i see a grey exclamation mark.
i checked the code and the error coming from the SDWebimage is :
Error Domain=NSURLErrorDomain Code=-1100 "The operation couldn’t be completed. (NSURLErrorDomain error -1100.)"

if when you first open the app you go directly to the local tab and select an album and an image then the sharing works fine and the image looks ok.
in order to reproduce the error you must first tap share on an image inside the 1st tab, and then go back to the 4th local tab to do that again.

again thanks so much for this library.
Regards
Konstantinos

Initial display of image with navigation bar and toolbar hidden

Currently when you present the gallery controller it displays the image with the navigation bar and toolbar visible, then tapping on the image hides them. Is it possible to display the image with the bars hidden from the beginning, then tapping the image makes them visible again?

Version 1.5 crash

I updated from version 1.4 to 1.5 with no changes to my code, and now when I tap on an image to present it in MHVideoPhotoGallery, the image no longer appears. If I try and dismiss that view, it produces the below crash.

I noticed that if I log the description of an MHGalleryItem object created with initWithImage it shows "nil description". This is the case for both version 1.4 and 1.5. In version 1.4, however, if I add those images as MHGalleryController galleryItems, it still works fine.

Thread : Fatal Exception: CALayerInvalidGeometry
0  CoreFoundation                 0x2ec56f03 __exceptionPreprocess + 130
1  libobjc.A.dylib                0x393ebce7 objc_exception_throw + 38
2  CoreFoundation                 0x2ec56e45 -[NSException initWithCoder:]
3  QuartzCore                     0x310fa3bb CA::Layer::set_position(CA::Vec2<double> const&, bool) + 242
4  QuartzCore                     0x310fa2bf -[CALayer setPosition:] + 54
5  QuartzCore                     0x310fa24f -[CALayer setFrame:] + 606
6  UIKit                          0x31483463 -[UIView(Geometry) setFrame:] + 254
7  UIKit                          0x31497583 -[UIImageView _setViewGeometry:forMetric:] + 186
8  UIKit                          0x314974bf -[UIImageView setFrame:] + 38
9  MTC                            0x002368d9 -[MHUIImageViewContentViewAnimation setFrame:] (MHUIImageViewContentViewAnimation.m:151)
10 MTC                            0x002274c5 -[MHTransitionDismissMHGallery startInteractiveTransition:] (MHTransitionDismissMHGallery.m:156)
11 UIKit                          0x31572be1 __101-[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:animation:]_block_invoke_2 + 1272
12 UIKit                          0x31505e09 _applyBlockToCFArrayCopiedToStack + 316
13 UIKit                          0x3147eb57 _afterCACommitHandler + 430
14 CoreFoundation                 0x2ec22031 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
15 CoreFoundation                 0x2ec1f9bf __CFRunLoopDoObservers + 286
16 CoreFoundation                 0x2ec1fd0b __CFRunLoopRun + 738
17 CoreFoundation                 0x2eb8a7a9 CFRunLoopRunSpecific + 524
18 CoreFoundation                 0x2eb8a58b CFRunLoopRunInMode + 106
19 GraphicsServices               0x33af76d3 GSEventRunModal + 138
20 UIKit                          0x314e9891 UIApplicationMain + 1136
21 MTC                            0x000c25cf main (main.m:16)
22 libdyld.dylib                  0x398e9ab7 start + 2

Animation issue: iOS7.1 beta5

With iOS7.0 the animation while tapping an item in the "TestCell" went smooth.

However with iOS7.1 beta 5 there is some kind of animation glitch during fullscreen animation...

Disable collection gallery

How can I Disable collection gallery in this lib?
I mean this collection: I tap on photo and I am in photoView, I tap back and I am in collection gallery.
I want to go back to my VC then I tap this back. Is it possible?

Unrecognized selector locationInView:

When a mp4 video starts playing, MHImageViewController's method -(void)changeToPlayable adds a UIButton with target handelImageTap:

If you tap on the video while it is playing, you will get an exception in -(void)handelImageTap:(UIGestureRecognizer *)gestureRecognizer{ at:

CGPoint tappedLocation = [gestureRecognizer locationInView:self.view];

Since gestureRecognizer is a UIButton instead of a UIGestureRecognizer, and does not respond to selector locationInView

iOS 7.1 status bar appearance not restored

Hello Mario,

When set:

[[MHGallerySharedManager sharedManager] setOldStatusBarStyle:UIStatusBarStyleLightContent];

It will work only in the case you don't sort gallery in grid style. So if you enter the gallery, and then immediately press Done, it will work.

image switching crash

Reproduce bug:

Must have at least 2 images/videos open in MHGalleryImageViewerViewController

  • scroll to the last but one image/video
  • push share button
  • scroll to last image/video in the MHShareViewController
  • Press Cancel
  • the share view controller will dismiss and the last image/video will be presented in MHGalleryImageViewerViewController
  • ISSUE: the rightBarButton which switches to the next image/video is enabled and when it is pressed the application crashes because
    * Terminating app due to uncaught exception 'NSRangeException', reason: '* -[__NSArrayI objectAtIndex:]: index 2 beyond bounds [0 .. 1]'

Exception happens in MHGalleryController.itemForIndex:

Bug can be fixed with placing the below code to the end of MHGalleryImageViewerViewController.viewWillAppear


MHImageViewController *theCurrentViewController = self.pageViewController.viewControllers.firstObject;
NSUInteger indexPage = theCurrentViewController.pageIndex;

if (indexPage+1 == self.numberOfGalleryItems-1) {
self.rightBarButton.enabled = NO;
}
if (indexPage-1 == 0) {
self.leftBarButton.enabled = NO;
}

iOS 7.1 crashing on Done button while video is being show

Hello,

I'm encountering strange problem with some videos, from Youtube for now. First off the video thumbnail is not displayed, only grey background. After press video starts to load but it will not starts playing until play is pressed.

When the button Done is pressed, thats when the crash occurs with following:

*** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]'

Some of problematic Youtube videos:

http://www.youtube.com/watch?v=l3HYLLruJis#t=52
http://www.youtube.com/watch?v=TpaQYSd75Ak#t=54

CALayer position contains NaN: [nan nan]

Hello Mario, I'm expiriencing some issues with iPhone 4/4s and iPad mini.
CALayerInvalidGeometry. Stack trace bellow.

I can't reproduce the error.
Any ideas?

Well your framework is really helpfull, so thanks anyway for hard work!!

STACK TRACE:

0   CoreFoundation  <redacted> + 130    
1   libobjc.A.dylib objc_exception_throw + 38   
2   CoreFoundation  <redacted> + 0  
3   QuartzCore  <redacted> + 242    
4   QuartzCore  <redacted> + 54 
5   QuartzCore  <redacted> + 594    
6   UIKit   <redacted> + 254    
7   UIKit   <redacted> + 184    
8   UIKit   <redacted> + 38 
9       -[MHUIImageViewContentViewAnimation setFrame:] (MHUIImageViewContentViewAnimation.m:152) + 3271561  
10      -[MHTransitionDismissMHGallery startInteractiveTransition:] (MHTransitionDismissMHGallery.m:156) + 3209077  
11  UIKit   <redacted> + 1254   
12  UIKit   <redacted> + 316    
13  UIKit   <redacted> + 430    
14  CoreFoundation  <redacted> + 20 
15  CoreFoundation  <redacted> + 284    
16  CoreFoundation  <redacted> + 730    
17  CoreFoundation  CFRunLoopRunSpecific + 522  
18  CoreFoundation  CFRunLoopRunInMode + 106    
19  GraphicsServices    GSEventRunModal + 138   
20  UIKit   UIApplicationMain + 1136    
21          main (main.m:16) + 146983   
22  libdyld.dylib   <redacted> + 2

Have a nice day

Ivan

Double tap zoom behaviour is wrong

When tapping twice on an image, it zooms in a little strange. When double tapping again, the image should zoom out again, which is not the case.

UIActivityViewController issue with iOS 8

Hello,

There is an issue when using an ActivityViewController instead of an MHShareView on iOS 8; it requires an anchor point to be specified or the app will crash otherwise.

My fork is a mess and I am not sure how to create a pull request for only one commit but the fix is really short:
c701a07

Crash when dismissing Gallery on video

Hello,

I don't have the "why" of the crash (yet) but I can reproduce it.

The crash happens after trying to play this (240p only) video: https://www.youtube.com/watch?v=sn_GCGJCxo8
After waiting a few seconds the video doesn't seem to load even though the time bar appears. If you try to dismiss the video at this point the app crash at line 183 of MHTransitionDismissMHGallery.m with Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]'

Line 183 of MHTransitionDismissMHGallery.m is the last line of the following portion of code

if (imageViewerCurrent.isPlayingVideo && imageViewerCurrent.moviePlayer) {
        self.moviePlayer = imageViewerCurrent.moviePlayer;
        [self.moviePlayer.view setFrame:AVMakeRectWithAspectRatioInsideRect(imageViewerCurrent.moviePlayer.naturalSize,fromViewController.view.bounds)];

imageViewerCurrent.moviePlayer.naturalSize has a value of {0,0} in this situation, causing the exception.

Other videos seem to work fine.

Missing example for internationalization

I have created pt.lproj/Localizable.strings and pt.lproj/MHGalley.strings and i still cant translate "overview.title.current"...

I'll search in the code how MHGalleryLocalizedString works...

Framework Search Paths

The project contains your private user folder search path in "Framework Search Paths"

OverView interactive (dismiss & present)

Hello, How can I use your 'OverView interactive (dismiss & present)' with gallery.UICustomization.showOverView = NO; ?
I mean with image view not running MHVideoPhotoGallery

Make the image description scrollable

When I pass a very long text (e.g. a photo description from Facebook) it would be really great, if only the first lines are visible and the user can scroll up to fully read the description.
Facebook does the same with Facebook Paper

MHGalleryItem with Support for UIImage

Hey,
thanks for sharing your work. I really like it.

The dataSource for a gallery always contains MHGalleryItems which rely on the url. My dataSource (NSMutableArray) is made up of several UIImages fetched by CoreData objects. Is it possible to extend "MHGalleryItem" to support direct use of UIImages? Or do I need to write them down to the filesystem in order to get the url?

How to add my own localization

First of all, Excellent work!, I'm loving the library.

I noticed that it uses the method MHGalleryLocalizedString to load the strings from the MHGallery bundle.
How should I add my own localization?

Crashes on iOS 7.1

On iOS7.1 The presenting animation is performing weirdly and exiting gallery by tapping "Done" (MOstly when you're on a index with video on it) it crashes.

All uses of __block in project unnecessary

All the places in the project (other than the parts from SDWebImage) where "__block" appears in the code, it is completely unnecessary. In all the places, the __block variable is not assigned to anywhere after definition. And in some places, it even looks like it was used for a weak reference from pre-ARC days, which is no longer correct in ARC because __block in ARC is still by default a strong reference.

  • 2 x blockSelf in MHGalleryImageViewerViewController.m:396 and 416: "blockSelf" never assigned to after definition, and in fact is always the same as "self" since "self" is never assigned to either.
  • quality in MHGallerySharedManager.m:361: "quality" never assigned to after the initial if-statement.
  • completionHandler in MHShareViewController.m:602: "completionHandler" never assigned to after definition, and is not even captured by a block.
  • blockSession in MHShareViewController.m:803: "blockSession" never assigned to after definition, and in fact is always the same as "session" since "session" is never assigned to after definition either.
  • 2 x pageIndex in MHTransitionDismissMHGallery.m:44 and 146: "pageIndex" not even used in a block.
  • blockGallery in ExampleViewControllerCollectionViewInTableView.m:241: "blockGallery" never assigned to after definition, and in fact is always the same as "gallery" since "gallery" is never assigned to after definition either.
  • blockSelf in ExampleViewControllerImageView.m:67: "blockSelf" never assigned to after definition, and in fact is always the same as "self" since "self" is never assigned to either.
  • blockGallery in ExampleViewControllerLocal.m:110: "blockGallery" never assigned to after definition, and in fact is always the same as "gallery" since "gallery" is never assigned to after definition either.
  • blockGallery in ExampleViewControllerTableView.m:112: "blockGallery" never assigned to after definition, and in fact is always the same as "gallery" since "gallery" is never assigned to after definition either.

Dismissing animation issue on iOS 8

The issue is reproducible with the demo project, on a device or the simulator running iOS 8:

  • Open the gallery by touching an image or video
  • Start a swipe gesture to dismiss the gallery
  • Reverse your gesture to prevent the dismissing to happen

The result is the "closure" of the gallery (and the impossibility to re-open another one, seems like the gallery view controller is still presented somehow).

screenshot

The expected behavior is the cancellation of the dismissing.

Ok, thanks to this post here's a (temporary?) solution:
Add

        if ([self.context respondsToSelector:@selector(viewForKey:)]) { // is on iOS 8
            [[UIApplication sharedApplication].keyWindow addSubview:fromViewController.view];
        }

here.

Beware the completion block of the dismiss call on the gallery view controller is always called, even if the dismiss is canceled! (In iOS 7 this completion block was called only in the case of a successful dismiss of the viewController).

IOS8 extensions only available through UIActivityViewController

Hi, i'm creating a new app and I found this library fantastic.

However I noticed an incoming problem with iOS 8: By using a custom share interface (which is a great clone of photos app) we can't access the share extensions 3rd apps are going to provide.

  • One solution consists in replacing the actual ui, by just a multiple image picker (current is fine) and after selection is done, launch the iOS8 UIActivityViewController.
  • Another solution is just adding a button to the current custom ui to launch the UIActivityViewController in case the user want to use an extension.

Both solutions result in a 2-step sharing process which results in a poor user experience.

What are your thoughts about it?

Xcode 6 beta 4: MHGalleryItem description property conflict

It seems that since Xcode 6 beta 4 assigning to the description property of MHGalleryItem causes crashes. This is because NSObject implements a method description, which is used for other purposes and you are trying to override this with a property.
Renaming the property fixes the issue.

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.