I want to know if zero is a reserved tag number in cocoa.
I ask because I created UIButtons in a for loop from 0 to n and evaluated the loop index as every button tag created.
Then, when I tried to reference using viewWithTag and tried to change the property, I get a sigbart error for the button tag zero. All other buttons work fine.
To make my code work, I had to create buttons using for 1 - n + 1
tag is an integer instance variable in subclasses of UIView and like any other ivar integer, by default it is initialized to 0.
tag
, subview, , 0, subviews viewWithTag:, - , UIButton, , , , ( ?) .
viewWithTag:
documentation . (.. UIViews .. .) , , SIGBART , ( ) viewWithTag .
1.
Source: https://habr.com/ru/post/1784963/More articles:Confusion - реализованный интерфейс требует кастинга? - collectionsConvert C ++ string to int - c ++Find the best match from the regex capture group - regexTool for defining Java annotations in various Java APIs - java8 queen issues - actionscript-3How do I decide if an email was sent, sent, or sent? - c #Xcode - UILabel does not change the value to viewDidAppear - uilabelSpring Roo project as a transaction-free batch job - javaHow to interact with C ++ using a namespace - c ++https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1784968/git-surgery-splitting-out-a-single-repository-into-many-repositories&usg=ALkJrhjPKNP9mKqX_xlnmKcB5KSUt8epWQAll Articles