YangMingShan alternatives and similar libraries
Based on the "UI" category.
Alternatively, view YangMingShan alternatives based on common mentions on social networks and blogs.
-
IQKeyboardManager
Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView. Neither need to write any code nor any setup required and much more. -
DZNEmptyDataSet
DISCONTINUED. A drop-in UITableView/UICollectionView superclass category for showing empty datasets whenever the view has no content to display -
SkeletonView
☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting -
TTTAttributedLabel
A drop-in replacement for UILabel that supports attributes, data detectors, links, and more -
animated-tab-bar
:octocat: RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion -
MGSwipeTableCell
An easy to use UITableViewCell subclass that allows to display swippable buttons with a variety of transitions. -
SWTableViewCell
An easy-to-use UITableViewCell subclass that implements a swippable content view which exposes utility buttons (similar to iOS 7 Mail Application) -
JTAppleCalendar
The Unofficial Apple iOS Swift Calendar View. Swift calendar Library. iOS calendar Control. 100% Customizable -
FSPagerView
FSPagerView is an elegant Screen Slide Library. It is extremely helpful for making Banner View、Product Show、Welcome/Guide Pages、Screen/ViewController Sliders. -
JVFloatLabeledTextField
UITextField subclass with floating labels - inspired by Matt D. Smith's design: http://dribbble.com/shots/1254439--GIF-Mobile-Form-Interaction?list=users -
SwipeCellKit
Swipeable UITableViewCell/UICollectionViewCell based on the stock Mail.app, implemented in Swift. -
SideMenu
Simple side/slide menu control for iOS, no code necessary! Lots of customization. Add it to your project in 5 minutes or less. -
Alerts & Pickers
Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date... -
SwiftEntryKit
SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps. -
TPKeyboardAvoiding
A drop-in universal solution for moving text fields out of the way of the keyboard in iOS -
PageMenu
A paging menu controller built from other view controllers placed inside a scroll view (like Spotify, Windows Phone, Instagram) -
XLForm
XLForm is the most flexible and powerful iOS library to create dynamic table-view forms. Fully compatible with Swift & Obj-C. -
CSStickyHeaderFlowLayout
UICollectionView replacement of UITableView. Do even more like Parallax Header, Sticky Section Header. Made for iOS 7. -
SWRevealViewController
A UIViewController subclass for presenting side view controllers inspired on the FaceBook and Wunderlist apps, done right ! -
Material Components
[In maintenance mode] Modular and customizable Material Design UI components for iOS -
expanding-collection
:octocat: ExpandingCollection is an animated material design UI card peek/pop controller. iOS library made by @Ramotion
CodeRabbit: AI Code Reviews for Developers

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of YangMingShan or a related project?
README
YangMingShan is a collection of iOS UI components that we created while building Yahoo apps. The reason we open source it is to share useful and common components with the community. Feel free to open the feature request ticket for new UI component you see on Yahoo apps or send pull-request to benefit open source community.
Installation
YangMingShan can be installed via CocoaPods. Simply add
pod 'YangMingShan'
to your Podfile.
YangMingShan also supports Carthage. Simply add
github "yahoo/YangMingShan"
to your Cartfile.
The Components
A
YMSPhotoPicker
YMSPhotoPicker is an UIComponent that let you select multiple photos from your albums. You can also take a photo inside YMSPhotoPicker and select it with other photos. It has the exposed theme YMSPhotoPickerTheme that you can customize several parts of YMSPhotoPicker.
Part of the code in this package was derived from Yahoo Messenger and Yahoo Taiwan Auctions.
Usage
Add NSPhotoLibraryUsageDescription
and NSCameraUsageDescription
to your App Info.plist to specify the reason for accessing photo library and camera. See Cocoa Keys for more details.
Objective-C
Import
@import YangMingShan;
Add delegate to your view controller
@interface YourViewController ()<YMSPhotoPickerViewControllerDelegate>
Present default photo picker. Note it is only available for single selection
[self yms_presentAlbumPhotoViewWithDelegate:self];
Or init picker with limited photo selection of 10
YMSPhotoPickerViewController *pickerViewController = [[YMSPhotoPickerViewController alloc] init];
pickerViewController.numberOfPhotoToSelect = 10;
With customized theme
UIColor *customColor = [UIColor colorWithRed:64.0/255.0 green:0.0 blue:144.0/255.0 alpha:1.0];
UIColor *customCameraColor = [UIColor colorWithRed:86.0/255.0 green:1.0/255.0 blue:236.0/255.0 alpha:1.0];
pickerViewController.theme.titleLabelTextColor = [UIColor whiteColor];
pickerViewController.theme.navigationBarBackgroundColor = customColor;
pickerViewController.theme.tintColor = [UIColor whiteColor];
pickerViewController.theme.orderTintColor = customCameraColor;
pickerViewController.theme.cameraVeilColor = customCameraColor;
pickerViewController.theme.cameraIconColor = [UIColor whiteColor];
pickerViewController.theme.statusBarStyle = UIStatusBarStyleLightContent;
Present customized picker
[self yms_presentCustomAlbumPhotoView:pickerViewController delegate:self];
Implement photoPickerViewControllerDidReceivePhotoAlbumAccessDenied: and photoPickerViewControllerDidReceiveCameraAccessDenied: to observe photo album and camera access denied occur
- (void)photoPickerViewControllerDidReceivePhotoAlbumAccessDenied:(YMSPhotoPickerViewController *)picker
{
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Allow photo album access?", nil) message:NSLocalizedString(@"Need your permission to access photo albums", nil) preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *dismissAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", nil) style:UIAlertActionStyleCancel handler:nil];
UIAlertAction *settingsAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Settings", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
}];
[alertController addAction:dismissAction];
[alertController addAction:settingsAction];
[self presentViewController:alertController animated:YES completion:nil];
}
- (void)photoPickerViewControllerDidReceiveCameraAccessDenied:(YMSPhotoPickerViewController *)picker
{
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Allow camera access?", nil) message:NSLocalizedString(@"Need your permission to take a photo", nil) preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *dismissAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", nil) style:UIAlertActionStyleCancel handler:nil];
UIAlertAction *settingsAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Settings", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
}];
[alertController addAction:dismissAction];
[alertController addAction:settingsAction];
// The access denied of camera is always happened on picker, present alert on it to follow the view hierarchy
[picker presentViewController:alertController animated:YES completion:nil];
}
Implement photoPickerViewController:didFinishPickingImages: while you expect there are multiple photo selections
- (void)photoPickerViewController:(YMSPhotoPickerViewController *)picker didFinishPickingImages:(NSArray *)photoAssets
{
[picker dismissViewControllerAnimated:YES completion:^() {
// Remember images you get here is PHAsset array, you need to implement PHImageManager to get UIImage data by yourself
PHImageManager *imageManager = [[PHImageManager alloc] init];
PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
options.networkAccessAllowed = YES;
options.resizeMode = PHImageRequestOptionsResizeModeExact;
options.synchronous = YES;
NSMutableArray *mutableImages = [NSMutableArray array];
for (PHAsset *asset in photoAssets) {
CGSize targetSize = CGSizeMake((CGRectGetWidth(self.collectionView.bounds) - 20*2) * [UIScreen mainScreen].scale, (CGRectGetHeight(self.collectionView.bounds) - 20*2) * [UIScreen mainScreen].scale);
[imageManager requestImageForAsset:asset targetSize:targetSize contentMode:PHImageContentModeAspectFill options:options resultHandler:^(UIImage *image, NSDictionary *info) {
[mutableImages addObject:image];
}];
}
// Assign to Array with images
self.images = [mutableImages copy];
}];
}
Swift
Import
import YangMingShan
Add delegate to your view controller
class YourViewController: UIViewController, YMSPhotoPickerViewControllerDelegate
Present default photo picker. Note it is only available for single selection
self.yms_presentAlbumPhotoViewWithDelegate(self)
Or init picker with limited photo selection of 10
let pickerViewController = YMSPhotoPickerViewController.init()
pickerViewController.numberOfPhotoToSelect = 10
With customized theme
let customColor = UIColor.init(red: 64.0/255.0, green: 0.0, blue: 144.0/255.0, alpha: 1.0)
let customCameraColor = UIColor.init(red: 86.0/255.0, green: 1.0/255.0, blue: 236.0/255.0, alpha: 1.0)
pickerViewController.theme.titleLabelTextColor = UIColor.whiteColor()
pickerViewController.theme.navigationBarBackgroundColor = customColor
pickerViewController.theme.tintColor = UIColor.whiteColor()
pickerViewController.theme.orderTintColor = customCameraColor
pickerViewController.theme.cameraVeilColor = customCameraColor
pickerViewController.theme.cameraIconColor = UIColor.whiteColor()
pickerViewController.theme.statusBarStyle = .LightContent
Present customized picker
self.yms_presentCustomAlbumPhotoView(pickerViewController, delegate: self)
Implement photoPickerViewControllerDidReceivePhotoAlbumAccessDenied(picker:) and photoPickerViewControllerDidReceiveCameraAccessDenied(picker:) to obesrve photo album and camera access denied occur
func photoPickerViewControllerDidReceivePhotoAlbumAccessDenied(_ picker: YMSPhotoPickerViewController!) {
let alertController = UIAlertController(title: "Allow photo album access?", message: "Need your permission to access photo albums", preferredStyle: .alert)
let dismissAction = UIAlertAction(title: "Cancel", style: .cancel, handler: nil)
let settingsAction = UIAlertAction(title: "Settings", style: .default) { (action) in
UIApplication.shared.open(URL(string: UIApplicationOpenSettingsURLString)!)
}
alertController.addAction(dismissAction)
alertController.addAction(settingsAction)
self.present(alertController, animated: true, completion: nil)
}
func photoPickerViewControllerDidReceiveCameraAccessDenied(_ picker: YMSPhotoPickerViewController!) {
let alertController = UIAlertController(title: "Allow camera album access?", message: "Need your permission to take a photo", preferredStyle: .alert)
let dismissAction = UIAlertAction(title: "Cancel", style: .cancel, handler: nil)
let settingsAction = UIAlertAction(title: "Settings", style: .default) { (action) in
UIApplication.shared.open(URL(string: UIApplicationOpenSettingsURLString)!)
}
alertController.addAction(dismissAction)
alertController.addAction(settingsAction)
// The access denied of camera is always happened on picker, present alert on it to follow the view hierarchy
picker.present(alertController, animated: true, completion: nil)
}
Implement photoPickerViewController(picker:didFinishPickingImages:) while you expect there are mutiple photo selections
func photoPickerViewController(picker: YMSPhotoPickerViewController!, didFinishPickingImages photoAssets: [PHAsset]!) {
// Remember images you get here is PHAsset array, you need to implement PHImageManager to get UIImage data by yourself
picker.dismissViewControllerAnimated(true) {
let imageManager = PHImageManager.init()
let options = PHImageRequestOptions.init()
options.deliveryMode = .HighQualityFormat
options.resizeMode = .Exact
options.synchronous = true
let mutableImages: NSMutableArray! = []
for asset: PHAsset in photoAssets
{
let scale = UIScreen.mainScreen().scale
let targetSize = CGSizeMake((CGRectGetWidth(self.collectionView.bounds) - 20*2) * scale, (CGRectGetHeight(self.collectionView.bounds) - 20*2) * scale)
imageManager.requestImageForAsset(asset, targetSize: targetSize, contentMode: .AspectFill, options: options, resultHandler: { (image, info) in
mutableImages.addObject(image!)
})
}
// Assign to Array with images
self.images = mutableImages.copy() as? NSArray
}
}
Instruction
- Sample Codes has been written in YangMangShanDemo project. You can read code to know about "How to implement these features in your project". Just use github to clone YangMingShan to your local disk. It should run well with your Xcode.
- API Reference Documents > Please refer the gh-pages in YangMingShan project. We use appledoc to generate this document. The command line we generate current document is ```shell appledoc --output {TARGET_FOLDER} --project-name "YangMingShan" --project-company "Yahoo" --company-id "com.yahoo" --no-warn-undocumented-object --keep-intermediate-files --ignore Private {YANGMINGSHAN_LOCOCAL_ROPOSITORY}
### License
This software is free to use under the Yahoo Inc. BSD license.
See the [LICENSE] for license text and copyright information.
*Note that all licence references and agreements mentioned in the YangMingShan README section above
are relevant to that project's source code only.