Skip to content

Commit

Permalink
Merge pull request #119 from weareopensource/helperCircular
Browse files Browse the repository at this point in the history
style(helpers): init helper UITricks, begin by makeCircular function 馃拕
  • Loading branch information
PierreBrisorgueil committed Nov 19, 2019
2 parents 9bbab99 + 484b986 commit 9d13dfb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions waosSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
BF794D41226856E6000B19F3 /* Differentiator.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF794D40226856E6000B19F3 /* Differentiator.framework */; };
BF794D51226880FB000B19F3 /* TasksService.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF794D50226880FB000B19F3 /* TasksService.swift */; };
BF794D532269C4FB000B19F3 /* TasksViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF794D522269C4FB000B19F3 /* TasksViewController.swift */; };
BF7F894D2383F0BB00F98D98 /* UITricks.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF7F894C2383F0BB00F98D98 /* UITricks.swift */; };
BF8BD5F7235F30660083B912 /* KeyboardConstraints.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF8BD5F6235F30660083B912 /* KeyboardConstraints.swift */; };
BF8C6723227C3E1E0012B5A8 /* TasksCellReactor.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF8C6722227C3E1E0012B5A8 /* TasksCellReactor.swift */; };
BF8C6725227C3E310012B5A8 /* TasksCellController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF8C6724227C3E310012B5A8 /* TasksCellController.swift */; };
Expand Down Expand Up @@ -251,6 +252,7 @@
BF794D40226856E6000B19F3 /* Differentiator.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Differentiator.framework; path = Carthage/Build/iOS/Differentiator.framework; sourceTree = "<group>"; };
BF794D50226880FB000B19F3 /* TasksService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TasksService.swift; sourceTree = "<group>"; };
BF794D522269C4FB000B19F3 /* TasksViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TasksViewController.swift; sourceTree = "<group>"; };
BF7F894C2383F0BB00F98D98 /* UITricks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UITricks.swift; sourceTree = "<group>"; };
BF8BD5F6235F30660083B912 /* KeyboardConstraints.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardConstraints.swift; sourceTree = "<group>"; };
BF8C6722227C3E1E0012B5A8 /* TasksCellReactor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TasksCellReactor.swift; sourceTree = "<group>"; };
BF8C6724227C3E310012B5A8 /* TasksCellController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TasksCellController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -715,6 +717,7 @@
isa = PBXGroup;
children = (
BF4A2F86225C8F160001B4CE /* UILocalizations.swift */,
BF7F894C2383F0BB00F98D98 /* UITricks.swift */,
);
path = UI;
sourceTree = "<group>";
Expand Down Expand Up @@ -1204,6 +1207,7 @@
BF8C67332280222A0012B5A8 /* UITableView+RxReusableKit.swift in Sources */,
BFA92D2D237C050C006A3B8D /* CoreTableViewCellController.swift in Sources */,
BF425484221EBB9700395AE6 /* AppDelegate.swift in Sources */,
BF7F894D2383F0BB00F98D98 /* UITricks.swift in Sources */,
BFA92D1E237BEEAB006A3B8D /* UserCellReactor.swift in Sources */,
BF49EA0D2362CC2D00FF06E9 /* L10n.swift in Sources */,
BF19509622B7CEEB00C593E5 /* Url.swift in Sources */,
Expand Down
8 changes: 8 additions & 0 deletions waosSwift/lib/helpers/UI/UITricks.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* @desc make circular view, must be called in override func layoutSubviews
* @param {UIView} _view,
*/
func makeCircular(_ view: UIView) {
view.layer.cornerRadius = view.bounds.size.width / 2.0
view.clipsToBounds = true
}

0 comments on commit 9d13dfb

Please sign in to comment.