There is an enumerateWithBlock NSArray method, but I need to list it in reverse order, is there a block for this, or do I need to use a for loop, not a fast loop, but the traditional for (int i = array.count - 1 ; i >= 0 ; i--) alone?
enumerateWithBlock
for
for (int i = array.count - 1 ; i >= 0 ; i--)
Thanks!
You can use enumerateObjectsWithOptions: usingBlock: passing the NSEnumerationReverse parameter as a parameter.
You can use reverseObjectEnumerator
reverseObjectEnumerator
for (id someObject in [myArray reverseObjectEnumerator]) { // print some info NSLog([someObject description]); }
Hope this helps!
Source: https://habr.com/ru/post/1444977/More articles:Regex - search for elements with name attribute but not id - htmlWidgets in JTable cells - javaCreate android framework.jar only - androidhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1444975/how-do-i-find-the-shortest-sequence-of-stack-moves-to-get-the-goal-stack&usg=ALkJrhhPFg5qRmtrdKdCAUvw3K2wxtSAjQConfiguring Django with sqlite3? - djangobase64 encoding length parameter - ruby | fooobar.comMapping hibernation with broken MySQL tables - mysqlWeekly group? - sqlCan UILocalNotification be used to wake up a task that is in the background - iosHow to check webapp with different versions of IE from one window? - internet-explorer-9All Articles