Тег ‘OOP’:

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:@"((@\"|\").*?(\"))"                                     [...]

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

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

DDProgressView – Custom Progress View

DDProgressView is a custom progress view à la Twitter for iPhone. DDProgressView works on both iOS and Mac OS. You must also compile the AppKitCompatibility.m file when targeting Mac OS. Thanks, Damien DeVille!

Теги: , , , , ,

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

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)];     [...]

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

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

Get Geo tags from image

Little application for getting geo location from photo

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

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

Основы Grand Central Dispatch

В предыдущих статьях писал, что хотел перевести одну интересную статью с английского, но вот нашел перевод  хорошей статьи на русский. Думаю автор перевода не будет против если я копию возьму себе :) Что это? Grand Central Dispatch, или, ко­рот­ко, GCD — это низ­ко­уров­не­вое API, ко­то­рая от­кры­ва­ет но­вый спо­соб ра­бо­тать с па­рал­лель­ны­ми (ори­ги­наль­но это concurrent, а не [...]

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

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

Integrate High Scores service of mob1serv

Для начала нужно немного ознакомиться на сайте mob1serv как это работает. Скачать либу с сайта или которую собрал я, немного модифицированную, добавил пару расширений. В мой версии также вложен пример с сайта mob1serv. Начнем… 1. Нам нужно проверить интернет соединение, лучше всего воспользоваться Reachability, уже готовым решением от разработчиков Apple. На этом моменте останавливаться не [...]

Теги: , , , , , ,

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

Integrate Apple Game Center to BeerTender iPhone Game

Hello English version comming soon… Предварительно: В игре BeerTender интегрированны дополнительно онлайн скоры от mob1serv, что позволяет отображать результат игры и на других версия iOS и даже на других платформах что бывает не мало важно! Прочитав документацию от apple принялся за дело. Большинство блоков кода взято из примеров приведенных в документации. Перед началом работы непосредственно [...]

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

Комментариев (13)

Add methods to obejct at runtime in Objective-C

Please, read this post for more understanding… Function for add method to object is class_addMethod Adds a new method to a class with a given name and implementation. 1BOOL class_addMethod(Class cls, SEL name, IMP imp, const char *types) Parameters cls     The class to which to add a method. name     A selector that specifies the name [...]

Теги: , , , , , ,

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