Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

check if UIView is UIButton or UILabel not

for subview in view.subviews {
    if subview is UIButton {
      	// this subview is UIButton
    } else if subview is UILabel {
      	// this subview is UILabel
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #UIView #UIButton #UILabel
ADD COMMENT
Topic
Name
7+6 =