有没有办法改变背景颜色UIWebView
?
IB效果UIWebView
行为中设置的颜色都没有:在加载实际内容之前,它显示为白色(在加载内容和呈现内容之间导致白色闪烁).
以编程方式设置背景颜色也不起作用.
这是代码:
@interface Web_ViewViewController : UIViewController {
UIWebView *web;
}
@property (nonatomic, retain) IBOutlet UIWebView *web;
@end
....
-(void)viewDidLoad {
super viewDidLoad;
web.backgroundColor = [UIColor blueColor];
NSURL *clUrl = [NSURL URLWithString:@"http://www.apple.com"];
NSURLRequest *req = [NSURLRequest requestWithURL:clUrl];
[web loadRequest:req];
}
Run Code Online (Sandbox Code Playgroud) 我正在iPhone上运行该应用程序的发布版本,它运行正常.XCode调试器中没有错误消息:
Running… Switching to thread 11779 Switching to thread 11779 sharedlibrary apply-load-rules all (gdb) continue Switching to thread 12291 Switching to thread 11779 Switching to thread 13059 Debugger stopped. Program exited with status value:0.
但是,当通过管理器连接到iPhone时,我在iPhone的控制台中看到这些消息:
WWed Oct 7 15:37:01 unknown com.apple.launchd[1] : (UIKitApplication:com.blah.blah[0x830c]) Bug: launchd_core_logic.c:2649 (23909):10 Wed Oct 7 15:37:01 unknown com.apple.launchd[1] : (UIKitApplication:com.blah.blah[0x830c]) Working around 5020256. Assuming the job crashed. Wed Oct 7 15:37:01 unknown com.apple.launchd[1] : (UIKitApplication:com.blah.blah[0x830c]) Job appears to have crashed: Segmentation fault Wed Oct 7 15:37:01 …
我需要像这样运行两个语句:
Select amount from db where ID=5 DELETE from db where ID=5
目前,我准备并运行两个不同的陈述.我想知道是否有办法将其合并为一个陈述.
基本上我需要做的就是在删除之前从行中获取一个数量列.
在IB中查看我有很多项目(包括视图本身).只有一个项目有标签0,但是下面的行适用于任何UITextBox,而不是标签为0.注意只有一个UITextBox有标签0,原因如下:
(UITextField *) [self.view viewWithTag:0]).text = @"foo";
有趣的是,当收到带有标签0的元素的触发事件时,我可以获得标签0的值而没有问题.
寻找标签0元素是否有限制?
我对Objective-C中的属性有一个非常基本的问题.
我只能通过点符号(Obj.MyProp
)来访问对象的属性@synthesize
myProp
.那是对的吗?
如果我使用自己的setter方法,我将不再能够以点表示法引用属性,这是真的吗?
基本上我正在寻找C#类型的功能,我可以编写自己的自定义getter/setter,并提供一个额外的代码,我需要在设置属性时执行.