I hereby claim:
- I am octover on github.
- I am octover (https://keybase.io/octover) on keybase.
- I have a public key whose fingerprint is 5480 1D5F 5045 98F9 E229 CC43 D58D EA34 BA02 B7BB
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
require 'find' | |
require 'xcodeproj' | |
Find.find("Carthage/Checkouts/.") do |f| | |
if f.end_with?(".xcodeproj") | |
project = Xcodeproj::Project.open(f) | |
project.targets.each do |target| | |
target.build_configurations.each do |config| |
extension UIColor { | |
func color(with colorScheme: ColorScheme) -> Color { | |
var red: CGFloat = 0 | |
var blue: CGFloat = 0 | |
var green: CGFloat = 0 | |
var alpha: CGFloat = 0 | |
let trait: UITraitCollection = { | |
switch colorScheme { | |
case .light: |
// This isn't documented to handle @2x, but it appears to in practice | |
// Had to put all images in a bundle so something like this: | |
image = [UIImage imageNamed:@"rounded_button.png"]; | |
// became: | |
NSURL *url = [[NSBundle mainBundle] URLForResource:@"BruffLiteResources" withExtension:@"bundle"]; | |
NSBundle *bundle = [NSBundle bundleWithURL:url]; | |
NSString *imagePath = [bundle pathForResource:@"share" ofType:@"png"]; | |
image = [UIImage imageWithContentsOfFile:imagePath]; |
I hereby claim:
To claim this, I am signing this object:
// save the info system button image to where you can access it, this should be able to | |
// go anywhere it gets run by an iPhone program, easiest if you do it with the simulator | |
UIButton *info = [UIButton buttonWithType:UIButtonTypeInfoLight]; | |
NSData *img = UIImagePNGRepresentation([info imageForState:UIControlStateNormal]); | |
NSString *path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"info.png"]; | |
[img writeToFile:path atomically:NO]; | |
NSLog(@"%@", path); |