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
set clipText to (the clipboard as string) | |
set theItems to paragraphs of clipText | |
set ret to "" | |
on replaceText(find, replace, subject) | |
set prevTIDs to text item delimiters of AppleScript | |
set text item delimiters of AppleScript to find | |
set subject to text items of subject | |
set text item delimiters of AppleScript to replace |
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
- (void)displayCrop { | |
ImageCropViewController *crop = [[ImageCropViewController alloc] init]; | |
NSMutableDictionary *imageInfo = [self getImageInfo:currentImage]; | |
crop.image = [UIImage imageWithContentsOfFile:[imageInfo getStringSetting:@"Location" withDefault:@""]]; | |
crop.cropSet = ^(CGRect newCrop, ImageCropViewController* imageCropView) { | |
NSMutableDictionary *imageInfo = [self getImageInfo:currentImage]; | |
[imageInfo saveRectSetting:@"Crop" withValue:newCrop]; | |
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
BlockAlertView *alert = [BlockAlertView alertWithTitle:NSLocalizedString(@"FEEDBACK_PROBLEM_TITLE", nil) message:NSLocalizedString(@"FEEDBACK_PROBLEM_MESSAGE", nil)]; | |
[alert setCancelButtonWithTitle:NSLocalizedString(@"Dismiss", nil) block:nil]; | |
[alert addButtonWithTitle:NSLocalizedString(@"VIEW_HELP_BUTTON_TEXT", nil) block:^{ | |
BlockAlertView *helpAlert = [BlockAlertView alertWithTitle:NSLocalizedString(@"HELP_TITLE", nil) message:NSLocalizedString(@"GOTALK_NOW_HELP_MESSAGE", nil)]; | |
[helpAlert setCancelButtonWithTitle:@"Dismiss" block:nil]; | |
[helpAlert addButtonWithTitle:NSLocalizedString(@"VIEW_OVERVIEW_BUTTON_TEXT", nil) block:^{ |
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
CGRect rect; | |
CGRectMakeWithDictionaryRepresentation((__bridge CFDictionaryRef)([NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"rect 1 of 500" ofType:@"plist"]]), &rect); |
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
import Cocoa | |
operator infix ~~ {} | |
@infix func ~~ (left: Any?, right: Any?) -> Any? { | |
if let temp = left { | |
return temp | |
} | |
if let temp = right { |
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
// | |
// PopupViewController1.h | |
// STPopup | |
// | |
// Created by Kevin Lin on 11/9/15. | |
// Copyright (c) 2015 Sth4Me. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |