UIView-Positioning
来源:互联网 发布:mysql fetch row 编辑:程序博客网 时间:2024/05/17 01:43
UIView-Positioning
UIView+Positioning is an Objective-C Category which provides easy shorthand methods to defining the frame properties (width, height, x, y) of any UIView based object in an easy fashion, as well as extra helpful properties and methods.
USAGE
Just use the properties x, y, width, height or use origin and size to kill two birds with one stone ;-)
UIButton *btnTest; // Or any other viewbtnTest.width = 250;btnTest.height = 100;btnTest.y -= 100;btnTest.x += 35;btnTest.centerX = 20;btnTest.centerY = 15;btnTest.size = CGSizeMake(150, 70);btnTest.origin = CGPointMake(25, 10);NSLog(@"%f", btnTest.lastSubviewOnX.x); // X value of the object with the largest X valueNSLog(@"%f", btntest.lastSubviewOnY.y); // Y value of the object with the largest Y value[btnTest centerToParent]; // Centers button to its parent view, if exists
PORTS
- UIView+Positioning for Xamarin by Cameron Ray (@camray)
LICENSE
Copyright (C) 2013 Developed by Shai Mishali
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- UIView-Positioning
- Positioning
- iOS开发之使用UIView-Positioning简化页面布局
- CSS Positioning
- CSS Positioning
- CSS Positioning
- CSS 定位 (Positioning)
- CSS 定位 (Positioning)
- CSS 定位 (Positioning)
- CSS 定位 (Positioning)浅析
- CSS 定位 (Positioning)
- ZOJ 3226 Mobile Positioning
- css定位(positioning)
- CSS 定位 (Positioning)
- CSS 定位 (Positioning)浅析
- 10022---CSS Positioning(定位)
- Positioning(定位)
- CSS2【3】-- Positioning
- 列表控件实现原理解析
- LINUX常用命令小整理
- 找字体的方法
- BPEL 学习笔记
- QueryPerformanceFrequency() 计算程序运行时间
- UIView-Positioning
- Swift中类的初始化器与继承
- Spring Web MVC 处理Http请求
- 内幕:一位Adobe中国区遭裁员工的“陈述”
- java实现序列化的两种方法
- C++高效程序设计
- Python的迭代器和生成器
- Eclipse中Android模拟器设备信息消失问题
- Struts2框架中的处理http