JPPhotoChooseBrowserDemo

  • In 2016, I took time to write a fake wechat project. This selector was packaged at that time. Recently I had time to think about this, so I pulled out the code from that year and created this little project. Attached is the address of fake wechat: fake wechat
  • So tell me about this little project. Of course, post the address first: Image picker

How to use it?

  • Drag this folder ‘JPPhotoChooseBrowser’ into the project as a whole
  • Drag the images contained in images in ‘assets.xcassets’ under’ assets.xcassets’ of the current project
  • Introduce header file #import “jpphoto. h” delegate JPPhotoManagerDelegate in the controller you want to use

Methods to introduce

/** singleton uses a singleton call to start the method @returnSingleton */ + (JPPhotoManager *)sharedPhotoManager;Copy the code
/ * * boot image selector is the default choice most nine @ param viewController in current controller * / - (void) openPhotoListWithController: [UIViewController *)viewController;Copy the code
@param maxImageCount Specifies the maximum number of images to select. */ - (void)openPhotoListWithController:(UIViewController *)viewController MaxImageCount:(NSInteger)maxImageCount;Copy the code

Specific call

/ images/start selector [[JPPhotoManager sharedPhotoManager] openPhotoListWithController: self. SuperViewController MaxImageCount: 6]. // Set the proxy [JPPhotoManager sharedPhotoManager]. Delegate = self;Copy the code

Agent callback

Uncheck photo * / / * * - (void) imagePickerControllerDidCancel; /** Finish selecting the image @param thumbImages @param originalImages */ - (void)imagePickerControllerDidFinishPickingMediaWithThumbImages:(NSArray *)thumbImages originalImages:(NSArray *)originalImages;Copy the code