解决方案 »
- 用CLLocationManager得到当前城市和国家的名称。
- XMPP for IOS 客户端如何启用数据压缩
- drawRect中如何自定义UIView形状??我的代码有些问题
- Images.xcassets问题咨询
- 优酷 m3u8改版了 怎么播放不出来了
- 对于NSMutableDictionary *mDict ,为什么不能这样插进一个整数?
- XCode 中 UINavigationBar 右侧多按钮问题
- 想问下,由于适配使用了constraints约束,但是实际需要修改view的frame的时候又不能改了怎么办?
- ios大牛帮忙解决问题
- tabBar 点击index =1 的时候怎样让它还是index = 0
- 点击通知栏通知后的响应是在delegate.m的哪个函数里
- 什么时候需要重写layoutSubviews和drawRect方法
button.backgroundColor = [UIColor brownColor];
[button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[button setTitle:@"返回" forState:UIControlStateHighlighted];
[button addTarget:self action:@selector(click) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:button];
[button release]; UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 50, 320, 480)];
NSString *bundleStr = [[NSBundle mainBundle] resourcePath];
NSString *path = [[NSString alloc] initWithFormat:@"%@/%@.png", bundleStr, @"HomePageBkg"];
UIImage *image = [[UIImage alloc] initWithContentsOfFile:path];
[imageView setImage:image];[path release];[image release];
[self.view addSubview:imageView];
[imageView release];