ios-坐标系统
发布日期:2021-05-14 19:09:17 浏览次数:15 分类:精选文章

本文共 3832 字,大约阅读时间需要 12 分钟。

iOS������������

���iOS������������������������������������������������������������������������������������������������������0,0������������X���������������������������Y���������������������������iOS������CGPoint������������������������������CGRectMake(x, y)������������������CGSize������������������������������������������������CGSizeMake(width, height)���������������������


frame���bounds���center������������������

���iOS������������������frame���bounds���center������������������������������������������������������������������������������

  • frame������������������������������������������������������������������CGRect���������������������������������������������������������������
  • bounds������������������������������������������������������������������������������CGRect������������������������������������������������0,0������
  • center���������������������������������������������������������������CGPoint���������

������������������������������������������frame���bounds���������������������������������������������frame������������������������bounds���������������������center���������������������������������frame���bounds������������������������������������������

���������

-(CGRect) frame {
return CGRectMake(self.frame.origin.x, self.frame.origin.y, self.frame.size.width, self.frame.size.height);
}
-(CGRect) bounds {
return CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
}

������������������frame������������������������������bounds���������������������������������������������������������������������center������������������������������������������������������������������������������������������������������


������������

���iOS������������������frame���center������������������������frame���������������������������������������������������center���������������������������������������������������������������������������������������������������center���������������������������frame���������������

bounds������������������������������������������������������������������������������������������������������������������


UIScrollView������contentSize���contentInset���contentOffset

���UIScrollView������contentSize���contentInset���contentOffset���������������������������������������������

  • contentSize������������������������������������������������contentSize���������������������frame���������������������������������������������������������frame������0,0,320,480������UIScrollView���������contentSize������320,960������������������������������������960������������������������

  • contentOffset������������������������������frame���������������������������������������������������������UIScrollView������contentOffset������0,480���������������������������������������480���������

  • contentInset���������UIScrollView������������������������������������������������������contentInset������0,100������������������������������ScrollView������������������������100���������

������������������������������contentInsets���������contentView���������������contentOffset������������������������������������������������contentInset���contentOffset������������������������������������������


UITableView���������������������

������UIScrollView������������UITableView������������������������������������������������������������������������������contentSize���

  • (NSInteger) numberOfSections;
  • (NSInteger) numberOfRowsSectionsInSection:(NSInteger)section;
  • (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath;
  • (CGFloat) tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section;
  • (CGFloat) tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section;

UITableView���������������������������������������������������������contentSize������������������������������������������������������������������������CELL���SECTION������������������

上一篇:[[UIApplication sharedApplication] openURL:]
下一篇:bitcode

发表评论

最新留言

关注你微信了!
[***.104.42.241]2025年04月07日 12时48分30秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章