android和OPhone模拟器界面对比
OPhone是中国移动推出的手机操作系统平台,是基于android的,只是做了一些扩展。在界面和widget的显示效果还是有一些区别的。下面是我做的一个写blog的应用。看看它们的界面效果。 图1 android模拟器 图2 OPhone模拟器 本文转自 androidguy 51CTO博客,原文链接:http://blog.51cto.com/androidguy/214403 ,如需转载请自行联系原作者
一个简单的登录功能,遇到最大的问题就是怎么处理弹出的键盘,如何让它下去,这是一个首先要处理的问题。
ViewController.h:
#import <UIKit/UIKit.h> @interface DXWViewController : UIViewController - (IBAction)OKClick:(id)sender; - (IBAction)cancleClick:(id)sender; @property (retain, nonatomic) IBOutlet UILabel *label; - (IBAction)end:(id)sender;//键盘退出方法 @property (retain, nonatomic) IBOutlet UITextField *name; @property (retain, nonatomic) IBOutlet UITextField *password; @end
ViewController.m:
#import "DXWViewController.h" @interface DXWViewController () @end @implementation DXWViewController - (void)viewDidLoad { [super viewDidLoad]; //view一加载就让输入框成为第一响应者 [self.name becomeFirstResponder]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; } - (IBAction)OKClick:(id)sender { NSString *strName = self.name.text; NSString *strPwd = self.password.text; self.label.text = [NSString stringWithFormat:@"姓名:%@,密码:%@",strName,strPwd]; //根据字的长度来设置label的大小,而不是用autolayerout来实现 CGSize size = [self.label.text sizeWithFont:self.label.font]; CGRect frame = CGRectMake(self.label.frame.origin.x,self.label.frame.origin.y, size.width, self.label.frame.size.height); self.label.frame = frame; } - (IBAction)cancleClick:(id)sender { } - (void)dealloc { [_label release]; [_name release]; [_password release]; [super dealloc]; } - (IBAction)end:(id)sender { [self.name resignFirstResponder]; [self.password resignFirstResponder]; } @end
微信关注我们
转载内容版权归作者及来源网站所有!
低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。
为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。
Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。
Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。
WebStorm 是jetbrains公司旗下一款JavaScript 开发工具。目前已经被广大中国JS开发者誉为“Web前端开发神器”、“最强大的HTML5编辑器”、“最智能的JavaScript IDE”等。与IntelliJ IDEA同源,继承了IntelliJ IDEA强大的JS部分的功能。