From the documentation of -[NSArray indexOfObjectIdenticalTo:]
2013-02-01 15:05
465 查看
From the documentation of
and
and 2147483647 = 0x7fffffff is the maximum integer in iOS.
-[NSArray indexOfObjectIdenticalTo:]:
Return Value
The lowest index whose corresponding array value is identical to anObject. If none of the objects in the array is identical to anObject, returnsNSNotFound.
and
NSNotFoundis defined as:
enum{NSNotFound=NSIntegerMax};
and 2147483647 = 0x7fffffff is the maximum integer in iOS.
//buttonId is NSArray - (void)eventTouchObserved:(id)sender { UIButton *touchedButton = [buttonId objectAtIndex:[buttonId indexOfObjectIdenticalTo:sender]]; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.3]; [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:touchedButton cache:NO]; [UIView commitAnimations]; [touchedButton setImage:[UIImage imageNamed:[NSString stringWithFormat:@"%@.png",[touchedButton currentTitle]]] forState:UIControlStateNormal]; }
相关文章推荐
- The Solutions of Warning:Unchecked cast from object to arraylist
- How to reduce the size of logging database OR How to purge the old data from Logging Database
- How to get the data from a cell when I click on the GridButtonColumn of the same row
- 69.You need to generate a list of all customer last names with their credit limits from the CUSTOMER
- Cannot assign value of type 'AnyObject' to type 'HereIsTheTypeName?'
- Convert array of key value object to object of the key values (ruby)
- Java Project提示"Errors occurred during the build. Excepted to find an object at table index”
- Passing a list of objects from view to controller via jquery ajax(Json(aspx) -> object(C#))
- About the issue of After delete a record from grid and refresh the datasource, the cursor go to first top record.
- bug:Operation is not valid due to the current state of the object.
- The object of type 'RectTransform' has been destroyed but you are still trying to access it
- 102.You want to import schema objects of the HR user using Oracle Data Pump from the development dat
- 解决asp.net error: Operation is not valid due to the current state of the object
- A brief introduction to XenBus from the perspective of the driver
- 'Operation is not valid due to the current state of the object' error during postback
- 10 Easy Ways To Protect Your Eyes From The Harms of Digital Devices
- 9 To view the results of a manual SQL Tuning Advisor task, which steps should the DBA take? A. From
- Deep patient:An unsupervised representation to predict the future of patient from the electronic
- How to get a notification from Linux when the set of network interfaces changes
- SPListItem Update Operation is not valid due to the current state of the object(对象的当前状态使该操作无效。)