{"id":13610694,"url":"https://github.com/adad184/MMPlaceHolder","last_synced_at":"2025-04-13T01:32:31.869Z","repository":{"id":19575905,"uuid":"22825499","full_name":"adad184/MMPlaceHolder","owner":"adad184","description":"A drop in solution to show UIView's size. Only one line code to use it.","archived":true,"fork":false,"pushed_at":"2015-10-20T01:40:44.000Z","size":3014,"stargazers_count":982,"open_issues_count":2,"forks_count":137,"subscribers_count":34,"default_branch":"master","last_synced_at":"2024-10-21T00:04:00.473Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adad184.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-11T03:19:11.000Z","updated_at":"2024-10-14T05:17:42.000Z","dependencies_parsed_at":"2022-08-24T11:20:53.348Z","dependency_job_id":null,"html_url":"https://github.com/adad184/MMPlaceHolder","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adad184%2FMMPlaceHolder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adad184%2FMMPlaceHolder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adad184%2FMMPlaceHolder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adad184%2FMMPlaceHolder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adad184","download_url":"https://codeload.github.com/adad184/MMPlaceHolder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223558273,"owners_count":17165101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T19:01:47.100Z","updated_at":"2024-11-07T17:30:26.063Z","avatar_url":"https://github.com/adad184.png","language":"Objective-C","funding_links":[],"categories":["Objective-C","Objective-C  Stars 1000以内排名整理"],"sub_categories":[],"readme":"MMPlaceHolder\n=============\n[![CocoaPods](https://img.shields.io/cocoapods/v/MMPlaceHolder.svg)]()\n[![CocoaPods](https://img.shields.io/cocoapods/p/MMPlaceHolder.svg)]()\n[![CocoaPods](https://img.shields.io/cocoapods/l/MMPlaceHolder.svg)]()\n\nA drop in solution to set a placeholder or show UIView's size\n\n[中文介绍](http://adad184.com/2014/08/21/kai-yuan-xiang-mu-mmplaceholder/)\n\nyou can use it for frame debug\n![demo](https://raw.githubusercontent.com/adad184/MMPlaceHolder/master/Screenshot/screenshot2.PNG)\n\nor you can use it for size debug\n![show](https://raw.githubusercontent.com/adad184/MMPlaceHolder/master/Screenshot/screenshot1.PNG)\n\n\nInstallation\n============\n\nThe preferred way of installation is via [CocoaPods](http://cocoapods.org). Just add\n\n```ruby\npod 'MMPlaceHolder'\n```\n\nand run `pod install`. It will install the most recent version of MMPlaceHolder.\n\nIf you would like to use the latest code of MMPlaceHolder use:\n\n```ruby\npod 'MMPlaceHolder', :head\n```\n\nUsage\n===============\n\nsimply, you only need one line code.\n\n```objc\n[yourView showPlaceHolder];\n```\n\n\nor you can customize youself.\n\n```objc\n@interface  UIView(MMPlaceHolder)\n\n- (void)showPlaceHolder;\n- (void)showPlaceHolderWithAllSubviews;\n- (void)showPlaceHolderWithAllSubviews:(NSInteger)maxDepth;\n- (void)showPlaceHolderWithLineColor:(UIColor*)lineColor;\n- (void)showPlaceHolderWithLineColor:(UIColor*)lineColor backColor:(UIColor*)backColor;\n- (void)showPlaceHolderWithLineColor:(UIColor*)lineColor backColor:(UIColor*)backColor arrowSize:(CGFloat)arrowSize;\n- (void)showPlaceHolderWithLineColor:(UIColor*)lineColor backColor:(UIColor*)backColor arrowSize:(CGFloat)arrowSize lineWidth:(CGFloat)lineWidth;\n- (void)showPlaceHolderWithLineColor:(UIColor*)lineColor backColor:(UIColor*)backColor arrowSize:(CGFloat)arrowSize lineWidth:(CGFloat)lineWidth frameWidth:(CGFloat)frameWidth frameColor:(UIColor*)frameColor;\n\n- (void)hidePlaceHolder;\n- (void)hidePlaceHolderWithAllSubviews;\n- (void)removePlaceHolder;\n- (void)removePlaceHolderWithAllSubviews;\n- (MMPlaceHolder *)getPlaceHolder;\n\n@end\n```\n\t\n\t\nand you can use the global configuration\n\n```objc\n@interface MMPlaceHolderConfig : NSObject\n\n+ (MMPlaceHolderConfig*) defaultConfig;\n\n@property (nonatomic, strong) UIColor *backColor;\n@property (nonatomic, assign) CGFloat arrowSize;\n@property (nonatomic, strong) UIColor *lineColor;\n@property (nonatomic, assign) CGFloat lineWidth;\n@property (nonatomic, strong) UIColor *frameColor;\n@property (nonatomic, assign) CGFloat frameWidth;\n\n@property (nonatomic, assign) BOOL showArrow;\n@property (nonatomic, assign) BOOL showText;\n\n\n@property (nonatomic, assign) BOOL visible;\n@property (nonatomic, assign) BOOL autoDisplay;\n@property (nonatomic, strong) NSArray *visibleMemberOfClasses;\n@property (nonatomic, strong) NSArray *visibleKindOfClasses;\n\n@end\n```\n\n\nChangelog\n===============\n\nv1.9  clean \u0026 optimize codes, and draw the frame directly \n\nv1.8  now you can hide the system view and keep the interface clean \u0026 tidy\n\n```objc\n    \n\t@property (nonatomic, assign) BOOL autoDisplaySystemView;\n\n```\n\nv1.7  now you can display the specific class while in Autodisplay mode(thx [pull request](https://github.com/adad184/MMPlaceHolder/pull/3) from [@mrdaios](https://github.com/mrdaios))\n\n```objc\n    \n    @property (nonatomic, strong) NSArray *visibleMemberOfClasses;\n    @property (nonatomic, strong) NSArray *visibleKindOfClasses;\n\n    [MMPlaceHolderConfig defaultConfig].visibleMemberOfClasses = @[UIImageView.class];\n    [MMPlaceHolderConfig defaultConfig].visibleKindOfClasses   = @[UIButton.class];\n\n```\n\nv1.6  now you can control the visibility of frame \u0026 arrow \u0026 text by\n\n```objc\n\n\t@property (nonatomic, strong) UIColor *frameColor;\n\t@property (nonatomic, assign) CGFloat frameWidth;\n\n\t[MMPlaceHolderConfig defaultConfig].showArrow = YES;\n\t[MMPlaceHolderConfig defaultConfig].showText = YES;\n```\nand modified the function `hidePlaceHolder` \u0026 add new function `removePlaceHolder`\n      \n```objc\n\t- (void)removePlaceHolder;\n\t- (void)removePlaceHolderWithAllSubviews;\n```\nmost important thing is you can automatic display the placeholder with one line code by\n      \n```objc\n    [MMPlaceHolderConfig defaultConfig].autoDisplay = YES;\n```\n\n\nv1.5  fix hidePlaceHolder bug when subviews shows placeholder\n\n\nv1.4  add a demo project \u0026 now you can config the global visability by\n\n```objc\n    [MMPlaceHolderConfig defaultConfig].visible = NO;\n```\n    \n\nv1.3  now you can add placeholders recursively by\n\n```objc\n    - (void)showPlaceHolderWithAllSubviews;\n    - (void)showPlaceHolderWithAllSubviews:(NSInteger)maxDepth;\n    - (void)hidePlaceHolderWithAllSubviews;\n```\n\n\nv1.2  now you can change default configuration by `[MMPlaceHolderConfig defaultConfig]`\n\n```objc\n    [MMPlaceHolderConfig defaultConfig].lineColor = [UIColor whiteColor];\n    [MMPlaceHolderConfig defaultConfig].backColor = [UIColor clearColor];\n    [MMPlaceHolderConfig defaultConfig].arrowSize = 3;\n    [MMPlaceHolderConfig defaultConfig].lineWidth = 1;\n```\n\n\nv1.1  now you can get or remove `MMPlaceHolder` by \n\n```objc\n    - (void)hidePlaceHolder;\n    - (MMPlaceHolder *)getPlaceHolder;\n```\n\n\nv1.0  you can custom or simply use it by\n\n```objc\n    - (void)showPlaceHolder;\n    - (void)showPlaceHolderWithLineColor:(UIColor*)lineColor;\n    - (void)showPlaceHolderWithLineColor:(UIColor*)lineColor backColor:(UIColor*)backColor;\n    - (void)showPlaceHolderWithLineColor:(UIColor*)lineColor backColor:(UIColor*)backColor arrowSize:(CGFloat)arrowSize ;\n    - (void)showPlaceHolderWithLineColor:(UIColor*)lineColor backColor:(UIColor*)backColor arrowSize:(CGFloat)arrowSize lineWidth:(CGFloat)lineWidth;\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadad184%2FMMPlaceHolder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadad184%2FMMPlaceHolder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadad184%2FMMPlaceHolder/lists"}