My Custom UITextView with syntax highlighting
Рубрики: others on Nov.05, 2011
Рубрики: iPad, iPhone, Mac OS X on Oct.22, 2011
Doc about font metric Getting Font Metrics
Рубрики: iPad, iPhone on Apr.14, 2011
Up till now there hasn’t been an easy way to add custom fonts to your iPhone applications. As of iOS 4 it has become very easy to do. Here is what you need to do in order to add custom fonts: Add your custom font files into your project using XCode as a resource Add [...]
Рубрики: others on Oct.11, 2009
Потерял свои закладки с этими данными. Для себя делаю заметку, но может кому то тоже понадобится.
Рубрики: iPhone on Oct.11, 2009
The most frequently used examples in Quartz Quartz Demo Open context: 123456// Create context UIGraphicsBeginImageContext(itemImage.size); CGContextRef context = UIGraphicsGetCurrentContext(); //Draw image in context CGContextDrawImage(context, imageRect, [itemImage CGImage]); Draw square in context: 12345CGContextSaveGState(context); // Set color to context for draw CGContextSetRGBFillColor(context, 0.4f, 0.4f, 0.4f, 0.4f); // gray color with alpha 40 % CGContextFillRect(context, rect); [...]
Рубрики: iPhone on Jul.30, 2009
Хороший способ подключения шрифтов. Кидаем в ресурсы наш шрифт. Вставляем и выполняем функцию. 12345678910111213141516NSUInteger loadFonts() { NSUInteger newFontCount = 0; NSBundle *frameworkBundle = [NSBundle bundleWithIdentifier:@"com.apple.GraphicsServices"]; const char *frameworkPath = [[frameworkBundle executablePath] UTF8String]; if (frameworkPath) { void *graphicsServices = dlopen(frameworkPath, RTLD_NOLOAD | RTLD_LAZY); [...]