iPhone 调整UIImage的大小

- (UIImage *)scale:(UIImage *)image toSize:(CGSize)size 
{ 
    UIGraphicsBeginImageContext(size); 
    [image drawInRect:CGRectMake(0, 0, size.width, size.height)]; 
    UIImage *scaledImage = UIGraphicsGetImageFromCurrentImageContext 
(); 
    UIGraphicsEndImageContext(); 
    return scaledImage; 
}

iPhone iPhone Meta标签

<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">

<meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>

<link href="iphone/apple-touch-icon.png" rel="apple-touch-icon"/>

<meta name=”format-detection” content=”telephone=no” >

iPhone 在iPhone上的TableView中设置自定义节标题

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
    NSString *sectionTitle = [self tableView:tableView titleForHeaderInSection:section];
    if (sectionTitle == nil) {
        return nil;
    }

    // Create label with section title
    UILabel *label = [[[UILabel alloc] init] autorelease];
    label.frame = CGRectMake(20, 6, 300, 30);
    label.backgroundColor = [UIColor clearColor];
    label.textColor = [UIColor colorWithHue:(136.0/360.0)  // Slightly bluish green
                                 saturation:1.0
                                 brightness:0.60
                                      alpha:1.0];
    label.shadowColor = [UIColor whiteColor];
    label.shadowOffset = CGSizeMake(0.0, 1.0);
    label.font = [UIFont boldSystemFontOfSize:16];
    label.text = sectionTitle;

    // Create header view and add label as a subview
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, SectionHeaderHeight)];
    [view autorelease];
    [view addSubview:label];

    return view;
}

iPhone iPhone调试警报窗口

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Worked!" message:@"Your function was called." delegate:self cancelButtonTitle:@"Close" otherButtonTitles:nil];
[alert show];

iPhone 颤动

#import <AudioToolbox/AudioToolbox.h>
...
AudioServicesPlaySystemSound (kSystemSoundID_Vibrate);