fork download
  1. #import <objc/objc.h>
  2. #import <objc/Object.h>
  3. #import <Foundation/Foundation.h>
  4. #import <UIKit/UIKit.h>
  5. @implementation TestObj
  6. - (NSString *)hexStringFromColor:(UIColor *)color {
  7. const CGFloat *components = CGColorGetComponents(color.CGColor);
  8.  
  9. CGFloat r = components[0];
  10. CGFloat g = components[1];
  11. CGFloat b = components[2];
  12.  
  13. return [NSString stringWithFormat:@"#%02lX%02lX%02lX",
  14. lroundf(r * 255),
  15. lroundf(g * 255),
  16. lroundf(b * 255)];
  17. }
  18. int main()
  19. {
  20. // your code goes here
  21. return 0;
  22. }
  23. @end
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.m:4:13: fatal error: 'UIKit/UIKit.h' file not found
    #import <UIKit/UIKit.h>
            ^~~~~~~~~~~~~~~
1 error generated.
stdout
Standard output is empty