This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// numi script | |
// screen width in UIKit points | |
width_p = 414 | |
// screen height in UIKit points | |
height_p = 896 | |
// screen diagonal in inches | |
diagonal_i = 6.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSLog(@"UIFontWeightUltraLight = %@", @(UIFontWeightUltraLight)); | |
NSLog(@"UIFontWeightThin = %@", @(UIFontWeightThin)); | |
NSLog(@"UIFontWeightLight = %@", @(UIFontWeightLight)); | |
NSLog(@"UIFontWeightRegular = %@", @(UIFontWeightRegular)); | |
NSLog(@"UIFontWeightMedium = %@", @(UIFontWeightMedium)); | |
NSLog(@"UIFontWeightSemibold = %@", @(UIFontWeightSemibold)); | |
NSLog(@"UIFontWeightBold = %@", @(UIFontWeightBold)); | |
NSLog(@"UIFontWeightHeavy = %@", @(UIFontWeightHeavy)); | |
NSLog(@"UIFontWeightBlack = %@", @(UIFontWeightBlack)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSLog(@"all supported localizations: %@", [[NSBundle mainBundle] localizations]); | |
NSLog(@"development localization: %@", [[NSBundle mainBundle] developmentLocalization]); | |
NSLog(@"preffered languages: %@", [NSLocale preferredLanguages]); | |
NSLog(@""); | |
NSLog(@"preffered localizations(most suitable): %@", [[NSBundle mainBundle] preferredLocalizations]); | |
NSLocale *activeLocale = [NSLocale localeWithLocaleIdentifier:[[[NSBundle mainBundle] preferredLocalizations] firstObject]]; | |
NSLog(@"active locale: %@", activeLocale.localeIdentifier); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returns focused (closest to the picker's vertical center) row. | |
* | |
* @param picker picker which rows should be inspected | |
* @param row center row to search around (row +- some_value) will be evaluated | |
* @param component component in picker to be inspected | |
* | |
* @note This approach requires use of -pickerView:viewForRow:forComponent:reusingView: for row creation, if you | |
* only use -pickerView:titleForRow:forComponent:, it won't be able to get views via -viewForRow:forComponent: | |
* and inspect them. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This one may be not optimal, first solution, but helps with NSLogs. | |
So you can have: | |
NSManagedObject *object = ... | |
// No \\Uabcd's in log | |
NSLog(@"object = %@", [[object debugDescription] unicodeUnescape]); | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# fix-xcode | |
# Rob Napier <[email protected]> | |
# Script to link in all your old SDKs every time you upgrade Xcode | |
# Create a directory called /SDKs (or modify source_path). | |
# Under it, put all the platform directories: | |
# MacOSX.platform iPhoneOS.platform iPhoneSimulator.platform | |
# Under those, store the SDKs: |