Рубрика: ‘iPhone’

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. Если кто-то имеет опыт как создать фаил в директории не принадлежащей программе,  без взлома устройства, и поделится! Буду очень признателен!

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

Теги: , , , , , ,

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

UIImage and Memory

+[UIImage imageNamed:]
• Reads the file, uncompresses it, caches result
• Cached copy of data is kept even if the UIImage is deallocated
• Low memory condition causes cache to be purged.
• No direct control over when cache is purged.
• Use for small frequently drawn images.
+[UIImage imageWithContentsOfFile:]
• Just reads enough of file to determine if it can open [...]

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

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

iPhone 3D Samples from “iPhone 3D Programming” book

iPhone 3D Samples from “iPhone 3D Programming Developing Graphical Applications with OpenGL ES” book.
Thanks Frank and Doris Rideout and O’REILLY
31 iPhone 3D Samples OpenGL ES 1.1 and 2.0

All links direct to http://examples.oreilly.com/
All Samples
HelloArrow

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

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

Good book!

Do you have a great idea for a graphics-intensive iPhone or iPad application, but don’t know how to bring it to life? This book offers the perfect solution: a crash course on the OpenGL graphics library with an overview of iPhone 3D development. Whether you’re an experienced OpenGL developer looking to build iPhone apps for [...]

Теги: , , , , ,

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

Make gradient on iPhone/iPad

It’s easy! As of iPhone SDK 3.0, custom gradients can be implemented very easily, without subclassing or images, by using the new CAGradientLayer
add framework
#import < QuartzCore/QuartzCore.h>

so, example:

Теги: , , , , , ,

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

Enable Emoji on iPhone OS 4.0 without jailbreak

1. Set up app Water Lou
2. Enter the secret code is 91929394.59
3. reboot
4. go to settings->general->keyboard->add keyboard

For displaing emoji icons in firefox you can use Grease Monkey.
Thanks waterworld.com.hk!

Теги: , ,

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

Simple XML Parser based on NSXMLParser +converter

Simple XML Parser based on NSXMLParser +converter to XML file
How To Setup:
insert next code to file “name of you project”_Prefix.pch
#import "XMLNode.h"
    #import "XMLParser.h"
    #import "XMLConvert.h"

Create and launching XMLParser.
You will get parsed data ( with XMLNode data type ) in callbackParser: method
NSURL *URLToFile = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"source" ofType:@"xml"]];
   
    XMLParser *parser [...]

Теги: , , , , , ,

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

Screenshots of new iPhone OS 4.0 beta

Home screen, more beautiful with background and folders!

Теги: , ,

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

Streatch image with stretchableImageWithLeftCapWidth: topCapHeight:

Sample
+ (UIImage*)greenBubble
{
    if (sGreenBubble == nil) {
        UIImage *i = [UIImage imageNamed:@"Balloon_1.png"];
        sGreenBubble = [[i stretchableImageWithLeftCapWidth:15 topCapHeight:13] retain];
    }
    return sGreenBubble;
}
 
+ (UIImage*)grayBubble
{
    if (sGrayBubble == nil) {
        UIImage *i = [UIImage imageNamed:@"Balloon_2.png"];
        sGrayBubble = [[i stretchableImageWithLeftCapWidth:21 topCapHeight:13] retain];
    [...]

Теги: , , , , ,

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