@@ -41,7 +41,7 @@ pub fn main() -> ! {
41
41
42
42
let root_vc: id = unsafe { * ( window. ui_view_controller ( ) as * mut id ) } ;
43
43
44
- let root_view: UIView = UIView :: from_id ( window. ui_view ( ) as id , true ) ;
44
+ let root_view: UIView = UIView ( window. ui_view ( ) as id ) ;
45
45
unsafe {
46
46
47
47
//let background = UIColor::alloc().initWithRed_green_blue_alpha_(0.1, 1.0, 2.0, 2.0);
@@ -68,7 +68,7 @@ pub fn main() -> ! {
68
68
69
69
match event {
70
70
Event :: NewEvents ( StartCause :: Init ) => {
71
- let root_view: UIView = UIView :: from_id ( window. ui_view ( ) as id , true ) ;
71
+ let root_view: UIView = UIView ( window. ui_view ( ) as id ) ;
72
72
//add_views(&root_view);
73
73
unsafe {
74
74
root_view. addSubview_ ( label. clone ( ) ) ;
@@ -103,7 +103,6 @@ pub fn main() -> ! {
103
103
_ => {
104
104
} ,
105
105
}
106
- println ! ( "LABEL REF COUNTE: {:?}" , label. get_retain_count( ) ) ;
107
106
} )
108
107
}
109
108
@@ -194,7 +193,7 @@ fn add_counte_label(count: i64) -> UIView {
194
193
let label = unsafe {
195
194
//let alloc = UILabel::alloc();
196
195
//printlnalloc.print_retain_count();
197
- let label = UILabel :: from_id ( UILabel :: alloc ( ) . init ( ) , true ) ;
196
+ let label = UILabel ( UILabel :: alloc ( ) . init ( ) ) ;
198
197
199
198
label. setFrame_ ( CGRect {
200
199
origin : CGPoint {
@@ -207,24 +206,20 @@ fn add_counte_label(count: i64) -> UIView {
207
206
} ,
208
207
} ) ;
209
208
210
- /*
211
209
let text_alloc = NSString :: alloc ( ) ;
212
- let text = NSString::from_id (
210
+ let text = NSString (
213
211
text_alloc. initWithBytes_length_encoding_ (
214
212
text_ptr as * mut std:: ffi:: c_void ,
215
213
text_length,
216
214
NSUTF8StringEncoding ,
217
- ),
218
- true
215
+ )
219
216
) ;
220
217
label. setText_ ( text) ;
221
- */
222
218
label
223
219
224
220
} ;
225
221
//label
226
- //UIView::from_id(label.id())
227
- label. into ( )
222
+ UIView ( label. 0 )
228
223
}
229
224
fn debug_init ( ) {
230
225
color_backtrace:: install_with_settings (
0 commit comments