- 浏览: 38673 次
文章分类
最新评论
-
peng13123:
...
Hibernate4+Spring3+SpringMVC -
peng13123:
好吧,呵呵zxxwlj 写道 翻/墙?违法。。。
我想问为啥我goagent的文章被删除了 -
zxxwlj:
翻/墙?违法。。。
我想问为啥我goagent的文章被删除了
这个,以前遇到过,后来不知怎么弄好了,现在就是你如果改下push之后的视图的背景图,随便换个颜色或者加点view,就不会有这个情况了
【计算高宽】
UILabel *alertLabel = [[UILabel alloc]initWithFrame:CGRectMake(5, 2, 60, 20)];
[alertLabel setText:@"个人简介"];
[alertLabel setFont:[UIFont boldSystemFontOfSize:15.0]];
[infoView addSubview:alertLabel];
NSString *userdesc=docModel.desc;
if (userdesc.length==0) {
userdesc=@"这位医生暂时没任何说明";
}
UILabel *info = [[UILabel alloc]initWithFrame:CGRectMake(10, 24, ScreenW-10, 50)];
[info setText:userdesc];
[info setFont:[UIFont systemFontOfSize:13]];
[info setLineBreakMode:NSLineBreakByCharWrapping];
info.numberOfLines=0;
info.textColor=[UIColor grayColor];
CGSize size=CGSizeMake(ScreenW-20, 1000);
CGSize infoSize = [userdesc sizeWithFont:[UIFont systemFontOfSize:13] constrainedToSize:size lineBreakMode:NSLineBreakByCharWrapping];
info.frame=CGRectMake(info.frame.origin.x, info.frame.origin.y, infoSize.width, infoSize.height);
[infoView addSubview:info];
发现用string.length*字号 可以计算宽度
【计算高宽】
UILabel *alertLabel = [[UILabel alloc]initWithFrame:CGRectMake(5, 2, 60, 20)];
[alertLabel setText:@"个人简介"];
[alertLabel setFont:[UIFont boldSystemFontOfSize:15.0]];
[infoView addSubview:alertLabel];
NSString *userdesc=docModel.desc;
if (userdesc.length==0) {
userdesc=@"这位医生暂时没任何说明";
}
UILabel *info = [[UILabel alloc]initWithFrame:CGRectMake(10, 24, ScreenW-10, 50)];
[info setText:userdesc];
[info setFont:[UIFont systemFontOfSize:13]];
[info setLineBreakMode:NSLineBreakByCharWrapping];
info.numberOfLines=0;
info.textColor=[UIColor grayColor];
CGSize size=CGSizeMake(ScreenW-20, 1000);
CGSize infoSize = [userdesc sizeWithFont:[UIFont systemFontOfSize:13] constrainedToSize:size lineBreakMode:NSLineBreakByCharWrapping];
info.frame=CGRectMake(info.frame.origin.x, info.frame.origin.y, infoSize.width, infoSize.height);
[infoView addSubview:info];
发现用string.length*字号 可以计算宽度
发表评论
-
Xcode7 ios9不能用http请求
2015-09-17 18:49 625Xcode7 使用NSURLSession发送HTTP请求的问 ... -
iOS UITableViewCell 中 调整imageView 的图片大小
2015-08-26 16:10 1295//设置图片 [cell.imageView setImage ... -
[转]iOS 万能跳转界面方法 (runtime实用篇一)
2015-08-24 10:27 538在开发项目中,会有这样变态的需求: 推送:根据服务端推送过来 ... -
周堋斐:梦想的开发者
2015-04-13 17:56 012年的深圳软件园也是各种。呵呵哒 -
IOS判断app在appstore是否有可用的更新
2015-03-13 10:25 494iTunes可以提供app的版本信息,主要通过appid获取, ... -
uitableview分割线 左右边距相同
2015-01-21 15:59 2482_myTableView1.separatorInset= ... -
在uiimageview中设置网络图片等比例大小
2014-12-30 15:38 688NSData *data=[NSData dataWith ... -
[转]iOS UISCrollView循环滚动 实现
2014-12-30 13:42 646google了半天发现很多人竟然搞不定,甚至还有人用数组左移右 ... -
view整体上移
2014-11-26 16:06 732如果你准备将你的老的 iOS 6 app 迁移到 iOS 7/ ... -
广告轮播
2014-11-17 20:05 429h <UIAlertViewDelegate,UIScr ... -
设置全局navigation barbuttonitem
2014-11-17 19:58 692#pragma mark 设置全局navigation bar ... -
nsdate 前一天,后一天
2014-11-17 19:57 1120h { NSDate *choseDate;//显示日 ... -
sdwebimage ios8 报错
2014-11-02 00:22 612报错:Use of undeclared identifier ... -
之前有人整理过Git上好用的iOS库,我搬运一下
2014-10-31 14:56 277之前有人整理过Git上好用的iOS库,我搬运一下: http: ... -
ios中添加和移除view
2014-08-14 11:36 786la = [[UILabel alloc]init]; ... -
UITextField只能输入数字且小数点后保留2位
2014-07-18 17:17 525#pragma mark UITextFieldDeleg ... -
NSTimer倒计时
2014-07-17 10:56 494// [NSTimer scheduledTimerWithT ... -
转】视图切换总结
2014-06-04 12:06 5071、利用ModalViewController切换View ... -
ios 判断网络连接以及获取路由信息
2014-05-29 11:53 1627首先 引入 Reachability.h 和Reachabil ... -
UINavigationController如何连续返回两级/回到第一级
2014-01-18 09:44 758//连续返回两级 int index=[[self.navig ...
相关推荐
pushViewContoller实现的手势滑动 百度地图push视图效果完整实例代码
2.在windows底下文件(夹)命名所采用的是GBK编码,而在Android中采用的UTF-8编码,所有使用adb 的push和pull命令时就会导致由于编码方式的不同而产生的错误,解决这一问题就只有对adb工具的源代码进行修改,让adb对...
从A视图 push B视图 pushD 视图 从D 视图 pop C 视图 pop A 视图
PUSH
git-fatal the remote end hung up unexpectedly 解决方法
WAP就像因特网,是一个内容丰富的网络,用户如何找到自己喜欢的站点,如何在一个站点中找到自己 喜 欢的业务,往往需要花上很长的一段时间。而WAP PUSH可以将某一站点或某一业务的链接通过短信发送到支 持WAP PUSH...
error: failed to push some refs to 'git@gitee.com:yanxiaoxin98/hair.git' 死都push不上去
解决docker报错The push refers to a repository
git-push-deploy:搭建一个你能够git push部署的远程repo
如何用git将本地项目push到GitHub上?如何用git将本地项目push到GitHub上?
本文给大家分享下模态Model视图跳转和Push视图跳转的需求实现。 开前自打小广告:一键合成APP引导页,包含不同状态下的引导页操作方式,同时支持动态图片引导页和静态图片引导页以及视频引导页;GitHub地址: ...
关于unipush推送消息,手机端接收消息并且展示通知栏的服务端代码资源。 适用于App消息推送,支持在线离线推送消息。适用场景多元化(只需要用户登录App时进行用户信息和手机设备id绑定的处理) 首先要引入unipush的...
出现的情况是 router.push 后,url变化了,但是页面没有刷新,手动刷新一下才出现应有的画面。 我看了一下 package.json,我的 vue 和 axios 是没有写版本号,但 vue-router 明明写了版本号,怎么可能以前行的,现在...
当你辛辛苦苦地在Linux下架设好SSH服务器,给账户分配完权限,以为什么都大功告成的时候。 这时你在客户端的Linux机器下登陆,可是可是,这时候爆出这段话remote:error:refuse ..... remote:error:blablabla ...
Push
解决adb push pull时,中文乱码,不能完成文件拷贝的问题。
彻底解决Mac端git clone/push速度太慢的问题,详情请参阅文档。
,Windows上快速push文件到安卓手机上的bat文件,解压文件后用记事本修改/mnt/sdcard/ebook为你想要的文件路径,然后保存运行,在命令行中输入文件名。ok就这么简单
push推送浅析,有关push的知识,有空可以多学习学习的。
基于dwr的server push ,后台是java,往页面推送数据