Тег ‘xCode’:

Local Notification Sample Code (OS 4.0 only)

Resource site
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”
@interface LocalPushAppDelegate : NSObject {
    UIWindow *window;
    UIBackgroundTaskIdentifier bgTask;
}

It will fire up a Local Notification to remind you one min before the event which is 2 [...]

Теги: , , , ,

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

Эксперемент

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

И собственно сам код

Теги: , , , , , ,

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

UML диаграммы в Xcode

На написание данного поста меня с подвигла недавняя задача! Мне нужно было для записки и слайдов дипломного проекта предоставить UML диаграммы. Сначала по гуглил и сразу попал на страницу одной софтины, которая называется MacTranslator, забегая на перед, т.к. многие могут просто не дочитать, НЕ РЕКОМЕНДУЮ ее покапать, хотя вряд ли ее кто и купит из [...]

Теги: , , , ,

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

В свободное время

В свободное время решил поработать немного над созданием простого клиента для социальной сети “Вконтакте”. Хочу поделиться маленьким результатом. Это пока скромная версия, которая может вывести список, отправить сообщение, изменить статус и еще несколько мелочей…
Я не руководился тем нужно это или нет, просто было интересно поработать с новым API от “Вконтакте”.
Спасибо за [...]

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

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

Tutorial: Drag and Drop file on NSImageView

Step by step for starter developers…
1. Create a project in xCode with name “DragAndDrop” or any else…2. Add an element “NSImageView” on main view in the MainMenu.xib

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

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

Does a NSString contain a substring ?

Here is a little tip on how to tell if a string contains another string, using the underused data type NSRange.
NSRange gives the starting location and the length of a given value, and is often used with arrays and strings. On this occasion we will use it to find the range of a substring within [...]

Теги: , , , , , ,

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

call controller methods from class

I created a class (Foo.m) which I would like to be able to call a method in the controller (MainViewController.m) which instantiated it. How do I do this?
One way you can do this is to create a property in your Foo class that references its creator. You should not retain this reference to avoid circular [...]

Теги: , ,

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

Hello Music Player

Here is a bare bones hello world-style example that demonstrates library access and music playback. In a few minutes you can have a working, if minimal, music player. Lacking a user interface, this code queues up the entire iPod library and starts playing immediately on launch.
Note: To follow these steps you’ll need a provisioned device [...]

Теги: , , , ,

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

Resize and Mask an Image

Make image with a mask!

Source:
- (UIImage*) maskImage:(UIImage *)image  {
   
    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
   
    UIImage *maskImage = [UIImage imageNamed:@"mask.png"];
    CGImageRef maskImageRef = [maskImage CGImage];
   
    // create a bitmap graphics context the size of the image
    CGContextRef mainViewContentContext = CGBitmapContextCreate (NULL, maskImage.size.width, maskImage.size.height, 8, 0, [...]

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

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

RegexKitLite – Lightweight Objective-C Regular Expressions for Mac OS X and iPhone

Very simple installation and in usage.
Installation in iPhone project:
1. Add files RegexKitLite.h and RegexKitLite.m to project.
2. Open Target of project and add -licucore in Other Linker Flags

3. Compile
Example:
Remove tags from web-page.
NSString *text =  [content stringByReplacingOccurrencesOfRegex:@"<.*>" withString:@""];

Site resource

Теги: , , ,

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