Advertisement
Guest User

Untitled

a guest
Jul 26th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. // Returns how many NSImageViews we had in a given view.
  2.  
  3. func subViewCheck (viewName viewName: NSView) -> Int {
  4.  
  5. var counter: Int = 0
  6. let views = viewName.subviews
  7.  
  8. for k in 0..<views.count {
  9.  
  10. if views[k].description.containsString("NSImageView") {
  11.  
  12. counter += 1
  13.  
  14. }
  15. }
  16.  
  17. return counter
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement