btn1 = [UIButton buttonWithType: UIButtonTypeRoundedRect];
[Btn1 setTitle: @ "OK" forState: UIControlStateNormal];
[Btn1 setFrame: CGRectMake (10, 10, 100, 50)];
[Self.view addSubview: btn1];
[Btn1 release];
This is the source, why run, Button's title can not display it?
Reply:
Remove [btn1 release];
Reply:
Useful, but why the release Button have problems? title is set up well before release
Reply:
Only the init UIButton only need to release.
Reply:
You did not give button alloc memory ah, release button, there is no future.
No comments:
Post a Comment