Тег ‘objective-c’:

NSTableView with custom header

Default header looks like this First we want change height of header: 12NSTableHeaderView *tableHeaderView = [[NSTableHeaderView alloc] initWithFrame:NSMakeRect(0, 0, 120, 60)];     [_tableView setHeaderView:tableHeaderView]; Next step we want change NSTableHeaderCell, can make category for this class or make subclass. So, I wrote subclass. Empty category

Теги: , , , , , , ,

Комментарии отсутствуют

ScrollView with scroll’s indicators, which are shown all the time.

My simple solution by writing category for UIImageView, because scroller is imageview. How to use :) Just setup tag for your scrollview and you will get one with scroll indicators, which are shown all the time. 1234567891011121314151617181920212223242526272829303132#define noDisableVerticalScrollTag 836913 #define noDisableHorizontalScrollTag 836914 @implementation UIImageView (ForScrollView) – (void) setAlpha:(float)alpha {         if (self.superview.tag [...]

Теги: , , , , , , , , , ,

Комментарии отсутствуют

NSRegularExpression sample for comment syntax highlighting

I have this text: 1word1 word2 " word3 //" word4 I wrote simple solution. I know it can be better. I know about Back Reference, but i don’t have experience with it. 123456789101112131415161718192021222324252627282930313233NSRegularExpression *expression = [NSRegularExpression regularExpressionWithPattern:@"((@\"|\").*?(\"))"                                     [...]

Теги: , , , , , , , , , ,

Комментарии отсутствуют

Simple EKDemo – EKEvent

Now we have controller for creating events. This controller included from 4.0 iOS SDK. SimpleEKDemo The application uses table views to display EKCalendar object and EKEvent objects retrieved from an EKEventStore object. It implements EKEventViewController for viewing and editing existing EKEvents, and uses EKEventEditViewController for creating new EKEvents.

Теги: , , , , , , , , , ,

Комментарий (1)

My Custom UITextView with syntax highlighting

Теги: , , , , , , , ,

Комментарий (1)

Color Picker for iOS

Example: 1234567891011121314151617181920212223242526272829303132333435363738394041- (void)viewDidLoad {     [super viewDidLoad];         // Do any additional setup after loading the view, typically from a nib.         if (self.cPicker == nil) {         [self.view setBackgroundColor:[UIColor grayColor]];         self.cPicker = [[VBColorPicker alloc] initWithFrame:CGRectMake(0, 0, 202, 202)];     [...]

Теги: , , , , , , , ,

Комментарии отсутствуют

Sorting by block

Sorting by block 12345678910111213141516171819NSArray *stringsArray = [NSArray arrayWithObjects:                                  @"string 1",                                  @"String 21",                       [...]

Теги: , , ,

Комментарии отсутствуют

Tweeting – example of Apple

Tweeting

Теги: , , , , , , , , ,

Комментарии отсутствуют

Get Geo tags from image

Little application for getting geo location from photo

Теги: , , , , , , , , , , ,

Комментарии отсутствуют

Administrator Privilege in Mac OS X app

If the Terminal command requires Administrator Privilege (aka sudo), use AuthorizationExecuteWithPrivileges instead. The following will create a file named “com.developers-life.test” is the root directory “/System/Library/Caches”. 123456789101112131415AuthorizationRef authorizationRef; FILE *pipe = NULL; OSStatus err = AuthorizationCreate(nil,                                    kAuthorizationEmptyEnvironment,     [...]

Теги: , , ,

Комментарии отсутствуют