Guest User

Untitled

a guest
Nov 21st, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. /*
  2.  
  3. UIButtonのレイアウトの実装
  4.  
  5. */
  6.  
  7. class myButtonView: UIView {
  8.  
  9. func myButtonViewFunc() -> CGRect{
  10.  
  11. let rectx = sWidth!/2
  12. let recty = sHeight!/2
  13. let rectWidth = sWidth!/2
  14. let rectHeight = sHeight!/2
  15. let buttonRect = CGRect(x:rectx,y:recty,width:rectWidth,height:rectHeight)
  16.  
  17. return buttonRect
  18. }
  19. }
Add Comment
Please, Sign In to add comment