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
/* | |
Maps.app uses its own custom marker annotations. Their icon is smaller (FB10143146), the title can be colored (FB9739380) | |
which is all pretty nice. Unfortunately, they’re not exposed as API. (Hence the feedbacks to expose them.) | |
Out of curiosity, I tried to hack around with MapKit to display them. Unfortunately, I didn’t succeed. Here’s what I tried: | |
I discovered _MKBalloonLabelMarkerView and its superclass _MKLabelMarkerView which might be the ones I’m looking for | |
(I might be wrong). | |
We can instantiate them using: |
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
- (NSString*)localizedRelativeTime { | |
NSDateComponentsFormatter *formatter = [[NSDateComponentsFormatter alloc] init]; | |
formatter.allowedUnits = NSCalendarUnitHour | NSCalendarUnitMinute; | |
formatter.unitsStyle = NSDateComponentsFormatterUnitsStyleShort; | |
if (self.timeIntervalSinceNow < 60 && self.timeIntervalSinceNow > -60) { | |
return NSLocalizedString(@"right now", @"from MapKit/Maps"); | |
} else if (self.timeIntervalSinceNow > 0) { | |
NSString *start = [formatter stringFromDate:NSDate.date toDate:self]; | |
return [NSString stringWithFormat:NSLocalizedString(@"in %@", @"placeholder: minutes/hours"), start]; | |
} else { |
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
// | |
// UIResponder+FTAdditions.h | |
// Streets | |
// | |
// Created by Ortwin Gentz on 09.05.16. | |
// Copyright © 2016 FutureTap. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
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
// | |
// UISegmentedControl+Accessibility.m | |
// | |
// Created by Ortwin Gentz on 30.05.14. | |
// Copyright (c) 2014 FutureTap. All rights reserved. | |
// | |
@implementation UISegmentedControl (Accessibility) | |
// Use these convenience setters for easy customization in IB using user defined runtime attributes |
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
#!/bin/bash | |
VENDORID=80012345 | |
DATAFOLDER="${HOME}/Sales Reports" | |
CLASSPATH="${HOME}/bin" | |
ZVENDORID=`printf %.10d ${VENDORID}` | |
for i in 1 2 3 4 5 6 7 8 9 10 11 12; do | |
for REGION in "AE" "AU" "CA" "CH" "CN" "DK" "EU" "GB" "HK" "ID" "IL" "IN" "JP" "MX" "NO" "NZ" "RU" "SA" "SE" "SG" "TR" "TW" "US" "WW" "ZA" ; do |
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
Pod::Spec.new do |spec| | |
spec.name = 'DTCoreText' | |
spec.version = '1.6.9' | |
spec.platform = :ios, '4.3' | |
spec.license = 'BSD' | |
spec.source = { :git => 'https://github.com/Cocoanetics/DTCoreText.git', :tag => spec.version.to_s } | |
spec.source_files = 'Core/Source/*.{h,m,c}' | |
spec.dependency 'DTFoundation/Core', '~>1.6.0' | |
spec.dependency 'DTFoundation/UIKit', '~>1.6.0' | |
spec.dependency 'DTFoundation/DTHTMLParser', '~>1.6.0' |
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
pod --verbose install | |
Analyzing dependencies | |
Updating spec repositories | |
Updating spec repo `master` | |
$ /usr/bin/git pull | |
Already up-to-date. | |
Resolving dependencies of `Podfile` |
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
UIDevice *device = [UIDevice currentDevice]; | |
SEL selector = NSSelectorFromString([device.systemVersion hasPrefix:@"7"] ? @"_deviceInfoForKey:" : @"deviceInfoForKey:"); | |
NSLog(@"DeviceColor: %@ DeviceEnclosureColor: %@", [device performSelector:selector withObject:@"DeviceColor"], [device performSelector:selector withObject:@"DeviceEnclosureColor"]); |
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
<?php | |
//please replace with your settings... | |
$i18n_folder = "Custom/Resources"; | |
$uiAutomationFolder = "Test/UIAutomationTests/lib"; | |
if(substr($i18n_folder, -1) != "/"){ | |
$i18n_folder.="/"; | |
} | |
$langs = array(); | |
$ihandle = opendir($i18n_folder); |
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
// | |
// XPathQuery.m | |
// FuelFinder | |
// | |
// Created by Matt Gallagher on 4/08/08. | |
// Copyright 2008 __MyCompanyName__. All rights reserved. | |
// | |
// Permission is given to use this source code file, free of charge, in any | |
// project, commercial or otherwise, entirely at your risk, with the condition | |
// that any redistribution (in part or whole) of source code must retain |
NewerOlder