Тег ‘Xcode’:

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

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

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

Tweeting – example of Apple

Tweeting

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

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

Problem with highlighting syntax in Xcode 4

1. Close Xcode 2. go to ~/Library/Application Support/Xcode/Color Themes 3. remove your themes 4. Start Xcode 5. Done Very Easy! hahahah UPDATE: Do not add your *.h files to prefix file!

Теги: ,

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

How to include ttf fonts to iOS app

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

Теги: , ,

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

Adding SVN revision to Xcode project

Просмотр ревизии в самом приложении предотвращает путаницу и всякие проблемы с отслеживанием текущей версии. Чтоб отслеживать версию репозитория нам нужно добавить слдеющий код 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 [...]

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

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

Xcode Shortcut Documents

You can download the zip file containing the original Pages Documents here. You will need Pages ’09 (part of iWork ’09) in order to open the documents. From: COCOA SAMURAI

Теги: ,

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

Example “NSPanel with NSProgressIndicator”

It’s simple. 1. Create NSPanel with indicator in IB 2. Present indicator and launch NSThread with your action method 123456789- (IBAction) push: sender {      if (panel == nil) {           panel = [[PanelWithIndicator alloc] init];      }      [NSThread detachNewThreadSelector:@selector(launchThread)      toTarget:self      withObject:nil];   [...]

Теги: , , , , ,

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

Uninstall/Resetting Xcode

To reset Xcode to its factory settings for the logged-in user, run these commands in Terminal: > defaults delete com.apple.Xcode > rm -rf ~/Library/Application\ Support/Xcode At one point in the process he opted to remove the Xcode developer tools and start the configuration from the beginning. Which leads to the tip: should you ever find [...]

Теги: , ,

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

Local Notification Sample Code (OS 4.0 only)

Start a new Window-based Application Project called LocalPush Add an instance variable bgTask in LocalPushAppDelegate Download Sample + 2 books “iPhoneMemoryManagementFinalVersion” and “ES 2.0 Programming Guide” 1234@interface LocalPushAppDelegate : NSObject {     UIWindow *window;     UIBackgroundTaskIdentifier bgTask; } It will fire up a Local Notification to remind you one min before the event [...]

Теги: , , , ,

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

Эксперемент

Написал простенькую программку ради эксперимента. С помощью программы можно ходит по корневому разделу системы, без Jailbreak. Если кто-то имеет опыт как создать фаил в директории не принадлежащей программе,  без взлома устройства, и поделится! Буду очень признателен! И собственно сам код

Теги: , , , , , ,

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