Рубрика: ‘iPad’
Рубрики: iOS, iPad, iPhone on Jan.30, 2012
Create movie from images seq. First part of method, initialize 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950- (void) writeImagesAsMovie:(NSArray *)array toPath:(NSString*)path { NSString *documents = [NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex: 0]; documents = [documents stringByAppendingPathComponent:currentWorkspace]; //NSLog(path); NSString *filename = [documents stringByAppendingPathComponent:[array objectAtIndex:0]]; UIImage *first = [UIImage imageWithContentsOfFile:filename]; [...]
Теги: AVAssetWriter, AVAssetWriterInput, AVCaptureDeviceInput, AVCaptureVideoDataOutput, AVFoundation, iOS, QuartzCore, Video
Рубрики: 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, iPad, iPhone, Mac OS X on Dec.17, 2011
I tried create loop by AVQueuePlayer, this method has delays between end and start play. for looping AVQueuePlayer i use this code: 123456[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playerItemDidReachEnd:) [...]
Теги: AVFoundation, AVMutableComposition, AVPlayer, AVPlayerActionAtItemEndNone, AVPlayerItem, AVPlayerLayer, AVQueuePlayer, AVURLAsset, iOS, NSNotificationCenter
Рубрики: iPad, iPhone, Mac OS X on Dec.17, 2011
if you will use or used AVPlayer or you want just know about changes, you can check AudioRouteChange. Simple solution: Add framework AudioToolbox and add import to file 1#import <AudioToolbox/AudioToolbox.h> Insert into init method or any other 1AudioSessionAddPropertyListener (kAudioSessionProperty_AudioRouteChange, callbackHeadphone_func, self); Listener callback 12345678910111213141516171819202122232425void callbackHeadphone_func ( void *inClientData, AudioSessionPropertyID inID, UInt32 inDataSize, const void *inData [...]
Теги: AudioSessionAddPropertyListener, AudioToolbox, iPhone, kAudioSessionProperty_AudioRouteChange
Рубрики: 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, Mac OS X on Oct.22, 2011
Doc about font metric Getting Font Metrics
Теги: iOS, UIFont
Рубрики: iPad, iPhone on Oct.05, 2011
Теги: Apple, Example, iOS, iPad, iPhone, objective-c, Sample, Twitter, UIKit, Xcode
Рубрики: Apple, iPad, iPhone on Jul.12, 2011
В новой бета-версии прошивки iOS 5, которую Apple выпустили сегодня, они активировали новую функцию под названием «Assistive Touch». Это было и в прошлых бетах, но активировать их можно только сейчас. Новая функция призвана принести немного больше возможностей для тех, кто испытывает проблемы с использованием традиционных жестов. Assistive Touch активируется при нажатии на заранее указанный угол. [...]
Теги: Assistive Touch, iOS, iOS 5
Рубрики: 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 [...]
Теги: plist, UIFont, Xcode
Рубрики: Apple, iPad, iPhone, Mac OS X on Feb.23, 2011
Просмотр ревизии в самом приложении предотвращает путаницу и всякие проблемы с отслеживанием текущей версии. Чтоб отслеживать версию репозитория нам нужно добавить слдеющий код bash скрипта. 12345678910REVISION=`svnversion -nc | /usr/bin/sed -e ‘s/^[^:]*://;s/[A-Za-z]//’` APPVERSION=`/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${TARGET_BUILD_DIR}"/${INFOPLIST_PATH}` xported="xported" if [ $APPVERSION != $xported ]; then /usr/libexec/PlistBuddy -c "Delete :CFBundleDisplayVersion" "${TARGET_BUILD_DIR}"/${INFOPLIST_PATH} /usr/libexec/PlistBuddy -c [...]
Теги: Apple, iOS, iPad, iPhone, Mac OS X, RegExp, SVN, Xcode, Кодинг