$ brew install ruby
$ gem install cocoapods
$ gem env
add /usr/local/Cellar/ruby/2.0.0-p0/bin to $PATH
$ pod setup
NSArray *fileURLs = [[NSFileManager defaultManager] contentsOfDirectoryAtURL:self.url | |
includingPropertiesForKeys:[NSArray array] | |
options:0 | |
error:nil]; | |
[fileURLs enumerateObjectsUsingBlock:^(NSURL *fileURL , NSUInteger idx, BOOL *stop) { | |
NSImage *elementIcon = [[NSWorkspace sharedWorkspace] iconForFile:[fileURL path]]; | |
CFStringRef fileExtension = (__bridge CFStringRef)[fileURL pathExtension]; | |
CFStringRef fileUTI = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, fileExtension, NULL); | |
if (UTTypeConformsTo(fileUTI, kUTTypeImage)) { |
// MyViews.xib に複数のViewをいれました | |
NSArray *nibContents = [[NSBundle mainBundle] loadNibNamed:@"MyViews" owner:nil options:nil]; | |
// RestorationIDに適当な名前をつけておいて取り出しました | |
__block UIView *targetView = nil; | |
[nibContents enumerateObjectsUsingBlock:^(UIView *view, NSUInteger idx, BOOL *stop) { | |
if ([view.restorationIdentifier isEqualToString:@"MyView"]) { | |
*stop = YES; | |
targetView = (UIView *)view; | |
} |
# root所有にしておかないと実行されない | |
sudo chown root ~/Library/LaunchAgents/me.tanb.sample.plist | |
sudo launchctl load ~/Library/LaunchAgents/me.tanb.sample.plist | |
+ (void)initialize | |
{ | |
_singleton = @[@"hoge", | |
@(100), | |
[UIImage new]]; | |
} | |
+ (id)getSettingsAtIndex:(NSUInteger)index | |
{ | |
NSArray *settings = [[NSArray alloc] initWithArray:_singleton copyItems:YES]; |
$ xattr -p com.apple.TextEncoding ~/Desktop/myfile.txt | |
xattr: /Users/tanb/Desktop/myfile.txt: No such xattr: com.apple.TextEncoding | |
$ xattr -p com.apple.TextEncoding ~/Desktop/myfile.txt | |
SHIFT_JIS;2561 |
(when (require 'flymake nil 'noerror) | |
;; ignore syntax check error http://d.hatena.ne.jp/sugyan/20100705/1278306885 | |
(defadvice flymake-post-syntax-check (before flymake-force-check-was-interrupted) | |
(setq flymake-check-was-interrupted t)) | |
(ad-activate 'flymake-post-syntax-check) | |
;; swift | |
(defvar swift-sdk-path "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk") | |
(defvar swift-configure-target "i386-apple-ios8.1") | |
(defun flymake-swift-init () |
- App Entry Point | |
app_event_loop() | |
- Bluetooth module's sniff interval | |
void app_comm_set_sniff_interval(const SniffInterval interval) | |
SniffInterval app_comm_get_sniff_interval(void) | |
enum SniffInterval { | |
SNIFF_INTERVAL_NORMAL | |
SNIFF_INTERVAL_REDUCED |
- drowing path | |
GPath * gpath_create(const GPathInfo * init) | |
void gpath_destroy(GPath * gpath) | |
void gpath_draw_filled(GContext * ctx, GPath * path) | |
void gpath_draw_outline(GContext * ctx, GPath * path) | |
void gpath_rotate_to(GPath * path, int32_t angle) | |
void gpath_move_to(GPath * path, GPoint point) | |
struct GPath { | |
uint32_t num_points | |
GPoint points |
- PROPERTYANIMATION | |
struct PropertyAnimation * property_animation_create_layer_frame(struct Layer * layer, GRect * from_frame, GRect * to_frame) | |
struct PropertyAnimation * property_animation_create(const struct PropertyAnimationImplementation * implementation, void * subject, void * from_value, void * to_value) | |
void property_animation_destroy(struct PropertyAnimation * property_animation) | |
void property_animation_update_int16(struct PropertyAnimation * property_animation, const uint32_t distance_normalized) | |
void property_animation_update_gpoint(struct PropertyAnimation * property_animation, const uint32_t distance_normalized) | |
void property_animation_update_grect(struct PropertyAnimation * property_animation, const uint32_t distance_normalized) | |
struct PropertyAnimation { | |
Animation animation | |
struct PropertyAnimation::@13 values |
$ brew install ruby
$ gem install cocoapods
$ gem env
add /usr/local/Cellar/ruby/2.0.0-p0/bin to $PATH
$ pod setup