My own method for sorting numbers in array
There is a big flaw in your program: This

if (min &gt; temp)


compares the addresses of the number objects, not their values.
The correct way is

if ([min compare:temp] == NSOrderedDescending)
// ...
if ([max compare:temp] == NSOrderedAscending)


You probably didn't notice the problem because "small" numbers are 
represented as "tagged pointers", but with

NSArray *array = @[@40000000000000, @300000, @10000000000000, @16];


your code gave a wrong result in my test.



Resetting min after the loop seems a bit counter-intuitive to me.
I would do that at the beginning, this also allows to restrict the scope of that variable to where it is needed. Also the second if should be
an else-if:

NSNumber *min = nil;
for (NSNumber *temp in inputMutableArray) {
    if (min == nil) {
        min = temp;
    } else if ([min compare:temp] == NSOrderedDescending) {
        min = temp;
    }
}


Of course you could contract the if statement to

    if (min == nil || [min compare:temp] == NSOrderedDescending) {
        min = temp;
    }


that is a matter of taste.



You could get rid of this loop by using Key-Value Coding to determine the minimum
value in the array:

NSNumber *min = [inputMutableArray valueForKeyPath:@"@min.self"];


But note that this can be significantly slower for large arrays
(compare Finding the smallest and biggest value in NSArray of NSNumbers).



Having almost identical code for the two cases (ascending/descending sort) is not necessary. If you define

NSComparisonResult sortOrder = ascending ? NSOrderedAscending : NSOrderedDescending;


at the beginning, then both cases can be treated with

while (inputMutableArray.count &gt; 0) {
    NSNumber *first = nil;
    for (NSNumber *temp in inputMutableArray) {
        if (first == nil || [temp compare:first] == sortOrder) {
            first = temp;
        }
    }

    [sortedArray addObject:first];
    [inputMutableArray removeObject:first];
}