横屏设置坐标

 StockChartHorizontalView * horizontalView = [[StockChartHorizontalView alloc]initWithFrame:CGRectMake(-([[UIScreen mainScreen]bounds].size.height-[[UIScreen mainScreen]bounds].size.width)/2, ([[UIScreen mainScreen]bounds].size.height-[[UIScreen mainScreen]bounds].size.width)/2, [[UIScreen mainScreen]bounds].size.height, [[UIScreen mainScreen]bounds].size.width) ];

CGAffineTransform rotation = CGAffineTransformMakeRotation(90/180.0*M_PI);

     horizontalView.transform = rotation;

    [[[UIApplication sharedApplication]keyWindow] addSubview:horizontalView];;

 

posted @ 2017-03-01 09:07  huayi007897  阅读(148)  评论(0编辑  收藏  举报