Articles Tagged 'ui'

Apple iPhone 3.0 SDK: Fixed bug on UIButton buttonWithType

As indicated in the post Apple iPhone SDK 3.0: first incompatibility of the Apple SDK 3.0 show different behaviors with respect to release 2.2.1. Support service for developers gave me the answer, and then the solution to the problem. . The answer was that the technical support [UIButton buttonWithType:] already called - inside - the initWithFrame . It follows that, according to tech support, writing:

More ...

Apple iPhone SDK 3.0: first incompatibility

After you install the SDK 3.0 for Apple iPhone, evidently still not perfectly stable, I immediately noticed some problems, both in the compilation of the code is in the general XCode. The most important - which I promptly reported with a "home" to Apple, developers at the center - the creation of buttons through code. Here's an excerpt of the code is not compatible with SDK 3.0:

1
2
3
4
[ [ UIButton buttonWithType : UIButtonTypeRoundedRect ] initWithFrame : CGRectMake ( 0 , 0 , 100 , 40 ) ] ; UIButton * myButton = [[UIButton buttonWithType: UIButtonTypeRoundedRect] initWithFrame: CGRectMake (0, 0, 100, 40)];
@ "Bottone" forState : UIControlStateNormal ] ; [MyButton setTitle: @ "Button" forState: UIControlStateNormal];
/ / Other settings
myButton ] ; [Self.view addSubview: myButton];

By filling out this code with the SDK 2.2.1 you get a classic button with the label "Button". With the SDK 3.0, the button is created, but the label disappears. la situazione sembra migliorare, nel senso che la label viene resa apparentemente in modo corretto. Using as buttonWithType the type UIButtonTypeCustom the situation seems to improve, in the sense that the label is apparently made ​​correctly. It is still strange to the sudden failure of the type UIButtonTypeRoundedRect . I am still awaiting a response from Apple ... I just novelties; place!

More ...


Stop SOPA