现在的位置: 首页 > 综合 > 正文

学习iPhone UIKit 6

2013年09月13日 ⁄ 综合 ⁄ 共 1074字 ⁄ 字号 评论关闭

学习iPhone UIKit 6

1、Wed网页显示,scalesPageToFit属性设置为YES,这样Web页面会根据屏幕大小进行自动伸缩。

2、UIWebView的状态监视;

3、Web页面的控制;

4、媒体数据的显示,显示JPEG 文件及 PDF文件;

5、HTML字符串的指定;

6、链接触摸的处理;

7、JavaScript的执行;

8、表格的分段显示;

9、表格的分组显示;

10、索引的活用;代码如下:

- (NSArray*)sectionIndexTitlesForTableView:(UITableView *)tableView
{
    return familyNames_;
}

11、取得特定的单元;

  //取得特定的单元

//不分段表格里给全部单元追加标志

12、单元的删除;

- (void)viewDidAppear:(BOOL)animated

{

    [ super viewDidAppear: animated ];

    [ self.tableView setEditing: YES animated: YES ];

}

13、单元的插入;

14、单元的移动;

- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath

{

    NSUInteger fromRow = sourceIndexPath.row;

    NSUInteger toRow = destinationIndexPath.row;

    while ( fromRow < toRow )

    {

        [ dataSource_ exchangeObjectAtIndex: fromRow

                          withObjectAtIndex: fromRow + 1 ];

        fromRow++;

    }

    while ( fromRow > toRow )

    {

        [ dataSource_ exchangeObjectAtIndex: fromRow withObjectAtIndex: fromRow - 1 ];

        fromRow--;

    }

}

//设置限制单元//限制单元移动到最后一个单元格的下方

15、编辑/完成按钮的追加;

抱歉!评论已关闭.