I assume number1 and number2 are pointers to objects. The < sign is comparing the pointers.
You need to compare the actual floatValue or doubleValue
if ([number1 doubleValue] < [number2 doubleValue])
….
More Related Contents:
- How to convert an NSString into an NSNumber
- get type of NSNumber
- How to convert NSNumber to NSString
- How to add two NSNumber objects?
- Determine if NSNumber is NaN
- NSNumber of seconds to Hours, minutes, seconds
- When to use -retainCount?
- Get the current first responder without using a private API
- NSArray from NSCharacterSet
- What are the new documentation commands available in Xcode 5? [closed]
- String comparison in Objective-C
- Converting RGB data into a bitmap in Objective-C++ Cocoa
- Generate a random alphanumeric string in Cocoa
- How can I get an NSDate object for today at midnight?
- Can’t endBackgroundTask: no background task exists with identifier, or it may have already been ended
- Avoiding “NSArray was mutated while being enumerated”
- Convert milliseconds to NSDate
- Compiler error “expected method not found” when using subscript on NSArray
- Remove characters from NSString?
- Get the type of a file in Cocoa
- How to visually create and use static cells in a UITableView embedded in a UIViewController
- UIScrollview with UIButtons – how to recreate springboard?
- Pass an Objective-C object to a function as a void * pointer
- Launching an Mac App with Objective-C/Cocoa
- What is the empty @interface declaration in .m files used for?
- iOS7 excessive navigationbar button padding
- How do I list all fields of an object in Objective-C?
- Creating an NSDateFormatter in Swift? [closed]
- Assigning an existing CGColor to a CGColor property works in iOS Simulator, not iOS device. Why?
- Getting reference to the top-most view/window in iOS application