Тег ‘objective-c’:
Рубрики: Mac OS X on Jan.22, 2012
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
Теги: Apple, Cocoa, Mac OS X, NSCell, NSTableHeaderCell, NSTableView, objective-c, OOP
Рубрики: iOS, iPad, iPhone, OOP on Dec.22, 2011
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 [...]
Теги: Category, iOS, iPad, iPhone, objective-c, OOP, pattern, scroll, UIImageView, UIKit, UIScrollView
Рубрики: Apple on Nov.08, 2011
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:@"((@\"|\").*?(\"))" [...]
Теги: iOS, Mac OS X, matchesInString, NSRegularExpression, objective-c, OOP, RegExp, regexpal, regularExpressionWithPattern, Xcode, Кодинг
Рубрики: others on Nov.06, 2011
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.
Теги: EKCalendar, EKEvent, EKEventStore, EKEventViewController, iOS, iPad, iPhone, objective-c, UI, UIKit, UITableViewController
Рубрики: iPhone on Oct.29, 2011
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)]; [...]
Теги: iOS, iPhone, objective-c, OOP, UIColor, UIImage, Ukraine, work, Кодинг
Рубрики: iPad, iPhone, Mac OS X on Oct.22, 2011
Sorting by block 12345678910111213141516171819NSArray *stringsArray = [NSArray arrayWithObjects: @"string 1", @"String 21", [...]
Теги: iOS, objective-c, sort, __block
Рубрики: iPad, iPhone on Oct.05, 2011
Теги: Apple, Example, iOS, iPad, iPhone, objective-c, Sample, Twitter, UIKit, Xcode
Рубрики: Mac OS X on Aug.18, 2011
Little application for getting geo location from photo
Теги: Apple, Application, Geo, Image, Mac, Mac OS X, Map, objective-c, OOP, Position, Tag, Ukraine
Рубрики: Mac OS X on Aug.17, 2011
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, [...]
Теги: Authorization, objective-c, OS X, sudo