E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
uicolor
生成随机颜色
比较好用的测试方法:生成随机颜色staticvarrandomColor:
UIColor
{//随机颜色letred=CGFloat(arc4random()%256)/255.0letgreen=CGFloat
貘鸣
·
2020-07-06 11:31
Swift 导航栏切换汇总
navigationBar.barTintColor=
UIColor
(red:112/255,green:194/255,blue:158/255,alpha:1)导航栏之间的跳转1.压栈self.navigationController.pushViewCntroller
iOS_开发
·
2020-07-06 10:51
加载MBProgressHUD
文本框和其相关属性@property(copy)NSString*labelText;@property(MB_STRONG)UIFont*labelFont;@property(MB_STRONG)
UIColor
zmjchuan
·
2020-07-06 01:37
UIKit高度定制 - UINavigationBar的继承与定制
UIApperance协议属性定制我们在UINavigationBar.h头文件中,看到如下修改NavigationBar背景颜色的属性@property(nullable,nonatomic,strong)
UIColor
秋刀生鱼片
·
2020-07-06 00:16
关于性能优化
设置圆角-(UIImage*)avaterImageWithImage:(UIImage*)imagesize:(CGSize)sizebackColor:(
UIColor
*)backColor{CGRectrect
L小杰
·
2020-07-05 23:41
iOS图片上加标签或者水印
*)text1XPos:(int)xposYPos:(int)yposfontName:(NSString*)fontNamefontSize:(CGFloat)fontSizefontColor:(
UIColor
weixin_30437337
·
2020-07-05 20:05
OC: NSMutableAttributedString 链式调用修改属性。查寻匹配特定字符
idvalue)的方法例子注意这里的实现,需要用weakSelf若引用foregroundColor///设置textforegroundColor-(NSMutableAttributedString*(^)(
UIColor
LiYaoPeng
·
2020-07-05 19:32
OC调用swift方法
在swift类中创建了方法:@objcfuncchangeViewColor(color:
UIColor
){self.backgroundColor=color}在OC中调用:[testchangeViewColor
LiLi_哩哩
·
2020-07-05 17:56
swif 4.1 自定义含有 subtitle 的 titleView
String)->UIView{lettitleLabel=UILabel(frame:CGRect(x:0,y:-2,width:0,height:0))titleLabel.backgroundColor=
UIColor
.cleartitleLabel.textColor
_浅墨_
·
2020-07-05 11:54
生成圆角的图片
paramborderColor边框原色@paramborderWidth边框宽度@return圆形图片*/(UIImage*)circleImage:(UIImage*)originImageborderColor:(
UIColor
seventhboy
·
2020-07-05 08:01
将颜色转换成图片(导航栏颜色渐变使用)
+(UIImage*)imageWithBgColor:(
UIColor
*)color{CGRectrect=CGRectMake(0.0f,0.0f,1,1.0f);UIGraphicsBeginImageContext
雨雪霏霏why
·
2020-07-05 03:00
iOS UIKit框架学习—UIToolbar
@classUIBarButtonItem,
UIColor
;@protocolUIToolbarDelegate;NS_CLASS_AVAILABLE_IOS(2_0)__TVOS_PROHIBITED
Wynter_Wang
·
2020-07-04 04:15
tabbaritem右上角自定义红点或者数字
WechatIMG193.jpeg第二步,编写代码.h文件-(void)showBadgeOnItemIndex:(int)indexcolor:(
UIColor
*)colo
小学生课代表
·
2020-07-04 00:48
iOS 开发中的 block 使用
typedefQGLabel*(^Block3)(
UIColor
*color);@interfaceQGLabel:UILabel@property(nonatomic,copy)Block3block2
树懒闪电先生
·
2020-07-02 17:53
iOS UIView设置阴影 切单个圆角
设置阴影-(void)addShadow:(
UIColor
*)coloroffset:(CGSize)offset{self.layer.shadowColor=color.CGColor;self.layer.shadowOffset
冰凉的枷锁lax
·
2020-07-02 17:12
IOS
代码
iOS项目开发框架“完全体”(三)-- 奥义“手里剑”
是一个非常重要的环节,后面涉及到继承,重写等各种问题,我们该考虑设计的共有api又有哪些呢,下面开始啦导航条文本的处理对应的接口-(void)naviTitle:(NSString*)titlecolor:(
UIColor
Suneday
·
2020-07-02 16:21
iOS 获取String中的url并用其他颜色显示
StringfileprivateletdetailText=UITextView().then{(textview)intextview.font=UIFont.systemFont(ofSize:14)textview.textColor=
UIColor
刑天舞干戚o
·
2020-07-02 16:45
swift设置圆角
/圆角弧度view.layer.masksToBounds=true//是否把圆角边切去view.layer.borderWidth=1//设置边框的宽度view.layer.borderColor=
UIColor
.redColor.CGColor
q313435352
·
2020-07-02 14:55
swift
UI视图的圆角设置
initWithFrame:CGRectMake(20,20,220,80)];[self.viewaddSubview:labelLayer];labelLayer.backgroundColor=
UIColor
.greenColor
番薯大佬
·
2020-07-02 14:56
iOS
开发编码收集
NavigationBar 相关
Tint颜色修改NavigationBar的背景颜色修改NavigationBar下的BarTint解决Push时NavigationBar右上角黑影self.view.backgroundColor=
UIColor
.wh
竹菜板
·
2020-07-02 12:15
修改UITextfield的Placeholder字体的颜色
//第一种
UIColor
*color=[UIColorwhiteColor];_userName.attributedPlaceholder=[[NSAttributedStringalloc]initWithString
旺仔爸
·
2020-07-02 06:34
iOS 7后UIView新增Tint Color属性
tintColor属性的声明如下:(以Swift为例)vartintColor:
UIColor
!默认情况下,一个视图的tintColor是为nil的,这意味着视图将
阳光大道在前方
·
2020-07-02 04:12
菜鸟教程——iOS UIKit绘制图像
iOS两大绘图框架:UIKit像UIImage、NSString(绘制文本)、UIBezierPath(绘制形状)、
UIColor
都知道如何绘制自己。
iOS谢先森
·
2020-07-02 04:09
iOS开发笔记--描边label
今天需求突然要求需要描边文字,在网上找了一下,发现挺简单的,自己封装了一个-(void)drawTextInRect:(CGRect)rect{CGSizeshadowOffset=self.shadowOffset;
UIColor
hopedark
·
2020-07-02 02:56
iOS
swift-UITableView 圆角cell
willDisplaycell:UITableViewCell,forRowAtindexPath:IndexPath){letcornerRadius:CGFloat=4.0cell.backgroundColor=
UIColor
.clearletlayer
hgypqn
·
2020-07-02 02:21
ios跑马灯效果
#import@interfaceRunLabel:UIView//字体颜色@property(nonatomic,strong)
UIColor
*textColor;//字体大小@property(nonatomic
吕阿蒙
·
2020-07-02 00:10
iOS开发
iOS 开发修改 searchbar 的背景颜色
/**先取消背景颜色*/-(UIImage*)imageWithColor:(
UIColor
*)colorsize:(CGSize)size{CGRectrect=CGRectMake(0,0,size.width
d晓峰
·
2020-07-01 23:49
iOS
searchbar
自定义
iOS为一段文字显示不同的颜色
次拆红包的机会";NSMutableAttributedString*attributedStr=[[NSMutableAttributedStringalloc]initWithString:str];
UIColor
青欢
·
2020-07-01 22:23
iOS开发
Swift-导航栏navigation
navigationBar.titleTextAttributes=[NSFontAttributeName:UIFont.systemFontOfSize(16),NSForegroundColorAttributeName:
UIColor
.bl
A_rcher34
·
2020-07-01 19:34
UITableView设置背景颜色碰到的细节技巧
设置一个UIView的背景颜色很简单,就是设置它的
UIColor
*backgroundColor属性。
2狗子你变了
·
2020-07-01 16:10
Swift 导航栏设置
bounds.size.heightoverridefuncviewDidLoad(){super.viewDidLoad()self.title="这是标题"self.view.backgroundColor=
UIColor
.yellow
aga8737
·
2020-07-01 16:02
iOS动画——辉光效果(Label)
*/@property(nonatomic,strong)
UIColor
*gl
LCLH
·
2020-07-01 10:09
iOS开发
iOS UIKit框架学习—UINavigationBar
一种支持分层内容导航的视觉控制,最常用于导航控制器@classUINavigationItem,UIBarButtonItem,UIImage,
UIColor
;@protocolUINavigationBarDelegate
Wynter_Wang
·
2020-07-01 09:05
Swift UIButton、UIImageView、元组、流程控制、标签
创建UIButton、UIImageViewletbtn=UIButton()btn.frame=CGRectMake(100,100,100,100)btn.backgroundColor=
UIColor
.redColor
chayc
·
2020-07-01 08:35
用SwiftGen管理UIImage等的String-based接口
问题现状平时我们使用UIImage,UIFont,
UIColor
会遇到很多String-based的接口方法,比如常用的UIImage:lettestImage=UIImage(named:"test"
hanson21
·
2020-07-01 06:26
uikit——UIView——appearance
backgroundColor@property(nullable,nonatomic,copy)
UIColor
*backgroundColorUI_APPEARANCE_SELECTOR;//defaultisnil.CanbeusefulwiththeappearanceproxyoncustomUIViewsubclasses
mardax
·
2020-07-01 03:58
uikit
iOS-切换当前的控制器(popThenPush)
AfuncpopThenPush(){//需要推出的控制器letviewController=UIViewController()viewController.view.backgroundColor=
UIColor
.redColor
缭雾
·
2020-07-01 02:11
iOS:swift设置部分圆角
configRectCorner方法写成公共方法,方便调用letlabel=UILabel(frame:CGRect(x:50,y:100,width:100,height:50))label.backgroundColor=
UIColor
.orangelabel.textColor
青灯古魔
·
2020-07-01 00:51
iOS学习
ios
swift
xcode
Swift心得之UI篇(二)
UIView的坐标相关创建一个UIView的对象letview1=UIView()view1.background=
UIColor
.yellowColor()view1.frame=CGRect(100,100,100,100
的的可可
·
2020-06-30 22:50
Swift-画虚线、虚线圆
画虚线letdotteShapLayer=CAShapeLayer()letmdotteShapePath=CGPathCreateMutable()dotteShapLayer.fillColor=
UIColor
.clearColor
小溪彼岸
·
2020-06-30 20:46
iOS基础(Swift)
swift:颜色的宏
UIColor
RGB16
extensionLECommon{//rbg转
UIColor
(16进制)classfuncRGB16(rgbValue:Int)->
UIColor
{returnUIColor.init(colorLiteralRed
半江瑟瑟
·
2020-06-30 14:51
iOS UIButton(按钮)点击改变背景色和标题颜色的简单实现
设计师给了点击的颜色和标题的颜色,假设按下的背景色是黄色(yellow),标题色是白色(white),而普通状态下的背景色是红色(red),标题色是绿色(green)则可以这样:btn.backgroundColor=
UIColor
.red
貘鸣
·
2020-06-30 12:49
Swift3.0 HexColor转
UIColor
extensionUIColor{classfunchex(hex:String)->
UIColor
{varcolorString=hex.trimmingCharacters(in:CharacterSet.whitespacesAndNewlines
Bager
·
2020-06-30 03:11
42、[ iOS ] #EEEEEE这种十六进制的颜色使用方式
一般美工给的都是十六进制的颜色,如这样#FF69B4,下面就是如何使用这种颜色的方法:我们美工给的图//--用法也很简单,先宏定义,然后调用:#pragmamark--
UIColor
宏定义#defineUIColorFromRGBA
天听云道
·
2020-06-30 02:39
【转】iOS开发小方法:根据
UIColor
一个颜色生成一张图片
经常忘记这个写法,Mark一下:+(UIImage*)imageWithColor:(
UIColor
*)color{CGRectrect=CGRectMake(0.0f,0.0f,1.0f,1.0f);
IUVO
·
2020-06-30 00:32
UIImage 的常用分类
可以自己设置边框大小和颜色+(UIImage*)imageWithClipImage:(UIImage*)imageborderWidth:(CGFloat)borderWidthborderColor:(
UIColor
家丁三锅
·
2020-06-29 16:01
【开源】在你的 App 中使用《一拳超人》背景色
OnePunchColor.gif这是Github项目地址我从《一拳超人》动画中吸取了22种和白色非常匹配的颜色,现在你可以通过
UIColor
或者UIView来通过一行代码调用这些颜色。
KyXu
·
2020-06-29 15:58
用颜色直接生成image
+(UIImage*)imageWithColor:(
UIColor
*)color{CGRectrect=CGRectMake(0,0,1,1);UIGraphicsBeginImageContext(
莫寂岚
·
2020-06-29 12:26
animaiton各种好玩动画·3
200,100,100,100);gradient.frame=rect;gradient.colors=[NSArrayarrayWithObjects:(id)[UIColorblueColor].CGColor,(id)[
UIColor
seventhboy
·
2020-06-29 08:32
color16进制转换
self.navigationController.navigationBar.barTintColor=[selfgetColor:@"2c2e30"withAlpha:1.0];//方法-(
UIColor
阿良天界
·
2020-06-29 01:12
上一页
12
13
14
15
16
17
18
19
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他