UI UIBUTTON
@import url(http://i.cnblogs.com/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);
- 常规创建方法
- 常用方法:UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];//自定义按钮
- [button setTitle:@"BTN1" forState: UIControlStateNormal];//设置按钮的标题,forstate代表按钮状态,UIControlStateNormal(常态)、UIControlStateHighlighted(高亮)、UIControlStateSelected(选中),对于任何特定状态下的按钮,都可以设定该按钮该状态下的按钮标题。用setTitle 方法 设置即可
- [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];//设置指定状态下,标题文字颜色
- [button setImage:[UIImage imageNamed:@"a.png"] forState:UIControlStateNormal];//设置某状态下的按钮图片,[UIImage imageNamed:@"a.png"]表示以图片的名字获取图片
- [button setBackgroundImage:[UIImage imageNamed:@"1.png"] forState:UIControlStateNormal];//设置背景图片
- [button setBackgroundColor:[UIColor whiteColor]];//设置背景色(不常用)
- button.titleLabel.font = [UIFont systemFontOfSize:12];//设置标题字体大小
- [ button addTarget:self action: @selector (pressed) forControlEvents:UIControlEventTouchUpInside];//添加触发事件及方法
@import url(http://i.cnblogs.com/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);
UI UIBUTTON的更多相关文章
- cocos2d(3.0)一些基础的东西
1.创建项目后环境配置: 附加文件夹:加入 $(EngineRoot) $(EngineRoot)cocos $(EngineRoot)cocos\editor-support $(EngineRoo ...
- GUI动态创建button
#include "cocos2d.h" #include "cocos-ext.h" USING_NS_CC; USING_NS_CC_EXT; using ...
- iOS中 语音识别功能/语音转文字教程详解 韩俊强的博客
每日更新关注:http://weibo.com/hanjunqiang 新浪微博 原文地址:http://blog.csdn.net/qq_31810357/article/details/5111 ...
- iOS中 语音识别功能/语音转文字教程具体解释 韩俊强的博客
原文地址:http://blog.csdn.net/qq_31810357/article/details/51111702 前言:近期研究了一下语音识别,从百度语音识别到讯飞语音识别:首先说一下个人 ...
- iOS开发——UI基础-UIButton、UIImageView、UILabel的选择
1.UILabel - UILabel的常见属性 @property(nonatomic,copy) NSString *text; 显示的文字 @property(nonatomic,retain) ...
- IOS开发UI基础之UIButton
什么是按钮?
- iOS学习——UI基础UIButton(七)
前面写了UIWindow.UIViewController,那些都是一些框架,框架需要填充上具体的view才能组成我们的应用,移动应用开发中UI占了很大一部分,最基础的UI实现是使用系统提供的各种控件 ...
- UI基础UIButton
UI基础UIButton 前面写了UIWindow.UIViewController,那些都是一些框架,框架需要填充上具体的view才能组成我们的应用,移动应用开发中UI占了很大一部分,最基础的UI实 ...
- 【iOS 开发】基本 UI 控件详解 (UIButton | UITextField | UITextView | UISwitch)
博客地址 : http://blog.csdn.net/shulianghan/article/details/50051499 ; 一. UI 控件简介 1. UI 控件分类 UI 控件分类 : 活 ...
随机推荐
- java树形目录展示
package test; import java.awt.Component;import java.awt.Container;import java.util.ArrayList;import ...
- 关于php留言本网站的搭建
1.检查php,http服务是否安装 [root@localhost ~]# rpm -qa | grep http httpd-tools--.el7.centos.x86_64 httpd--.e ...
- 【原】十分钟搞定pandas
http://www.cnblogs.com/chaosimple/p/4153083.html 本文是对pandas官方网站上<10 Minutes to pandas>的一个简单的翻译 ...
- wkhtmltopdf 安装使用笔记(CentOS6)
1. 在官网下载安装文件. http://wkhtmltopdf.org/ 安装时如果提示某些库找不到的话,使用yum安装即可. 2. 命令行测试 $ wkhtmltopdf http://news. ...
- SAML 2.0 setup steps, 效果图
Steps of setting up SAML SSO. 效果图 # Registry a Identity Provider services in:(Might need purchase) I ...
- jquery学习方法
http://www.runoob.com/jquery/jquery-tutorial.html jQuery 语法 通过 jQuery,您可以选取(查询,query) HTML 元素,并对它们执行 ...
- google浏览器打开报出文件不可读解决方案
1.打开*.desktop文件 gedit ~/.local/share/applications/name.desktop 在文件中做改动: The .desktop file should loo ...
- A python script to check NE syncfail and get log from CIPS
#! /usr/bin/env python # -*- coding: UTF-8 -*- """The script is to check whether NE i ...
- SLAM初探-SLAM for Dummies
SLAM综述性特别是原理讲述比较浅显易懂的的资料比较少,相对比较知名的是<SLAM for Dummies>,但中文资料相对较少,这里就简单概述一下<SLAM for Dummies ...
- 未解决的问题,登录163邮箱http://mail.163.com/,用xpath的方式定位密码输入框的时候,总是报找不到该元素
退出的时候出现: xpath定位方法: 注意xpath路径写的太长,如果层级全部写完定位不到,就尝试去掉一些层级