- (void)methedName{
if(){
_type ^=0x1;
}
}
What does this mean?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your question’s title and your code do different things.
0x1means “1” interpreted as hexadecimal digits. That happens to be the same as 1 in decimal.So
_type =0x1simply sets_typeto 1.^means the XOR (exclusive-or) operator.^=means compute the XOR of the left-hand side with the right-hand side and assign the result to the left-hand side. In other words,ios_type ^= 0x1is the same asios_type = ios_type ^ 0x1.So
ios_type ^= 0x1toggles the 1 bit ofios_type.