{"id":24896737,"url":"https://github.com/cameron/uiview-frame-helpers","last_synced_at":"2026-03-17T20:02:14.644Z","repository":{"id":4152857,"uuid":"5266881","full_name":"cameron/uiview-frame-helpers","owner":"cameron","description":"Less code to position and resize UIView objects.","archived":false,"fork":false,"pushed_at":"2014-01-24T23:33:14.000Z","size":180,"stargazers_count":59,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-02T07:20:31.573Z","etag":null,"topics":["objective-c"],"latest_commit_sha":null,"homepage":"","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/cameron.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":"2012-08-02T01:13:05.000Z","updated_at":"2025-06-04T07:42:23.000Z","dependencies_parsed_at":"2022-08-27T12:11:52.671Z","dependency_job_id":null,"html_url":"https://github.com/cameron/uiview-frame-helpers","commit_stats":null,"previous_names":["cameronboehmer/uiview-frame-helpers"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/cameron/uiview-frame-helpers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cameron%2Fuiview-frame-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cameron%2Fuiview-frame-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cameron%2Fuiview-frame-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cameron%2Fuiview-frame-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cameron","download_url":"https://codeload.github.com/cameron/uiview-frame-helpers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cameron%2Fuiview-frame-helpers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30630026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["objective-c"],"created_at":"2025-02-01T20:15:03.544Z","updated_at":"2026-03-17T20:02:14.596Z","avatar_url":"https://github.com/cameron.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UIView Frame Helpers\n\nDrowning in layout and positioning code? Slim down by up to 75% in common cases.\n\n### Setting X and Y\n```Objective-C\n// Then\nCGRect frame = myView.frame;\nframe.origin.x = ...\nframe.origin.y = ...\nmyView.frame = frame;\n\n// Now\n[myView setX:myXVal andY:myYVal];\n```\n\n### Adjusting X and Y\n```Objective-C\n// Then\nCGRect frame = myView.frame;\nframe.origin.x = frame.origin.x + xDelta;\nframe.origin.y = frame.origin.y + yDelta;\nmyView.frame = frame;\n\n// Now\n[myView adjustX:xDelta andY:yDelta];\n```\n\n### Positioning relative to another view, or the superview \n```Objective-C\n// Then\nCGRect frame = myView.frame;\nframe.origin.x = myOtherView.origin.x + myOtherView.size.width + kMyPaddingConst;\nframe.origin.y = myOtherView.origin.y;\nmyView.frame = frame;\n\n// Now\n[myView insideTopEdgeOfSuperviewBy:0];\n[myView outsideRightEdgeOf:myOtherView by:kMyPaddingConst];\n```\n\n### Chaining\n\n```Objective-C\n[[myView insideTopEdgeOfSuperviewBy:0] outsideRightEdgeOf:myOtherView by:kMyPaddingConst];\n```\n\n### Complete API\n\n```Objective-C\n// x \u0026 y\n@property (nonatomic, assign, setter=_setX:) CGFloat x;\n@property (nonatomic, assign, setter=_setY:) CGFloat y;\n- (id)setX:(CGFloat)x;\n- (id)setY:(CGFloat)y;\n- (id)setX:(CGFloat)x andY:(CGFloat)y;\n- (id)setXAndYFromPoint:(CGPoint)point;\n- (id)adjustX:(CGFloat)xd;\n- (id)adjustY:(CGFloat)yd;\n- (id)adjustX:(CGFloat)xd andY:(CGFloat)yd;\n- (id)centerXWith:(UIView *)v;\n- (id)centerYWith:(UIView *)v;\n- (id)centerWith:(UIView *)v;\n- (id)centerInRect:(CGRect)r;\n- (id)centerXInRect:(CGRect)r;\n- (id)centerYInRect:(CGRect)r;\n- (id)insideTopEdgeBy:(CGFloat)spacing;\n- (id)insideRightEdgeBy:(CGFloat)spacing;\n- (id)insideBottomEdgeBy:(CGFloat)spacing;\n- (id)insideLeftEdgeBy:(CGFloat)spacing;\n- (id)insideTopEdgeOf:(UIView *)v by:(CGFloat)spacing;\n- (id)insideRightEdgeOf:(UIView *)v by:(CGFloat)spacing;\n- (id)insideBottomEdgeOf:(UIView *)v by:(CGFloat)spacing;\n- (id)insideLeftEdgeOf:(UIView *)v by:(CGFloat)spacing;\n- (id)outsideTopEdgeBy:(CGFloat)spacing;\n- (id)outsideRightEdgeBy:(CGFloat)spacing;\n- (id)outsideBottomEdgeBy:(CGFloat)spacing;\n- (id)outsideLeftEdgeBy:(CGFloat)spacing;\n- (id)outsideTopEdgeOf:(UIView *)v by:(CGFloat)spacing;\n- (id)outsideRightEdgeOf:(UIView *)v by:(CGFloat)spacing;\n- (id)outsideBottomEdgeOf:(UIView *)v by:(CGFloat)spacing;\n- (id)outsideLeftEdgeOf:(UIView *)v by:(CGFloat)spacing;\n- (CGFloat)maxX;\n- (CGFloat)maxY;\n\n// width \u0026 height\n@property (nonatomic, assign, readonly) CGFloat width;\n@property (nonatomic, assign, readonly) CGFloat height;\n- (id)setW:(CGFloat)w;\n- (id)setH:(CGFloat)h;\n- (id)setW:(CGFloat)w andH:(CGFloat)h;\n- (id)adjustW:(CGFloat)wd;\n- (id)adjustH:(CGFloat)hd;\n- (id)adjustW:(CGFloat)wd andH:(CGFloat)hd;\n- (id)setSizeFromSize:(CGSize)size;\n- (id)setSizeFromView:(UIView *)v;\n- (id)scaleProportionallyByPercent:(CGFloat)factor;\n- (id)scaleProportionallyToWidth:(CGFloat)w;\n- (id)scaleProportionallyToHeight:(CGFloat)h;\n- (CGFloat)aspectRatio;\n\n// rounding coords of view frame\n- (id)alignToPixel;\n\n- (BOOL)isInside:(UIView *)view;\n- (id)debug;\n- (id)removeSubviews;\n- (NSMutableArray *)accessibilityLabels;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcameron%2Fuiview-frame-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcameron%2Fuiview-frame-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcameron%2Fuiview-frame-helpers/lists"}