@@ -205,37 +205,51 @@ - (void)applyImageContent:(NSMutableDictionary *)properties
205
205
206
206
if ( [self respondsToSelector: @selector (setStrech: )] )
207
207
{
208
- objc_msgSend ( self, @selector (setStrech: ), stretched );
208
+ // TODO: CY
209
+ [self performMsgSendWithTarget: self sel: @selector (setStrech: ) signal :(void *)&stretched];
210
+ // objc_msgSend( self, @selector(setStrech:), stretched );
209
211
}
210
-
212
+
211
213
if ( [self respondsToSelector: @selector (setRound: )] )
212
214
{
213
- objc_msgSend ( self, @selector (setRound: ), rounded );
215
+ // TODO: CY
216
+ [self performMsgSendWithTarget: self sel: @selector (setRound: ) signal :(void *)&rounded];
217
+ // objc_msgSend( self, @selector(setRound:), rounded );
214
218
}
215
219
216
220
if ( [self respondsToSelector: @selector (setGray: )] )
217
221
{
218
- objc_msgSend ( self, @selector (setGray: ), grayed );
222
+ // TODO: CY
223
+ [self performMsgSendWithTarget: self sel: @selector (setGray: ) signal :(void *)&grayed];
224
+ // objc_msgSend( self, @selector(setGray:), grayed );
219
225
}
220
226
221
227
if ( [self respondsToSelector: @selector (setPattern: )] )
222
228
{
223
- objc_msgSend ( self, @selector (setPattern: ), pattern );
229
+ // TODO: CY
230
+ [self performMsgSendWithTarget: self sel: @selector (setPattern: ) signal :(void *)&pattern];
231
+ // objc_msgSend( self, @selector(setPattern:), pattern );
224
232
}
225
233
226
234
if ( [self respondsToSelector: @selector (setStrechInsets: )] )
227
235
{
228
- objc_msgSend ( self, @selector (setStrechInsets: ), contentInsets );
236
+ // TODO: CY
237
+ [self performMsgSendWithTarget: self sel: @selector (setStrechInsets: ) signal :(void *)&contentInsets];
238
+ // objc_msgSend( self, @selector(setStrechInsets:), contentInsets );
229
239
}
230
240
231
241
if ( [self respondsToSelector: @selector (setCrop: )] )
232
242
{
233
- objc_msgSend ( self, @selector (setCrop: ), croped );
243
+ // TODO: CY
244
+ [self performMsgSendWithTarget: self sel: @selector (setCrop: ) signal :(void *)&croped];
245
+ // objc_msgSend( self, @selector(setCrop:), croped );
234
246
}
235
247
236
248
if ( [self respondsToSelector: @selector (setCropSize: )] )
237
249
{
238
- objc_msgSend ( self, @selector (setCropSize: ), cropSize );
250
+ // TODO: CY
251
+ [self performMsgSendWithTarget: self sel: @selector (setCropSize: ) signal :(void *)&cropSize];
252
+ // objc_msgSend( self, @selector(setCropSize:), cropSize );
239
253
}
240
254
241
255
self.contentMode = contentMode;
@@ -301,30 +315,46 @@ - (void)applyImageContent:(NSMutableDictionary *)properties
301
315
- (void )applyImageIndicator : (NSMutableDictionary *)properties
302
316
{
303
317
NSString * imageLoading = [properties parseStringWithKeys: @[@" loading" , @" image-loading" ]];
318
+
304
319
if ( imageLoading )
305
320
{
306
321
if ( NSOrderedSame == [imageLoading compare: @" white" options: NSCaseInsensitiveSearch] )
307
322
{
308
323
if ( [self respondsToSelector: @selector (setIndicatorStyle: )] )
309
324
{
310
- objc_msgSend ( self, @selector (setIndicatorStyle: ), UIActivityIndicatorViewStyleWhite );
325
+ // TODO: CY
326
+
327
+ UIActivityIndicatorViewStyle indicatorStyle = UIActivityIndicatorViewStyleWhite;
328
+
329
+ [self performMsgSendWithTarget: self sel: @selector (setIndicatorStyle: ) signal :(void *)&indicatorStyle];
330
+
331
+ // objc_msgSend( self, @selector(setIndicatorStyle:), UIActivityIndicatorViewStyleWhite );
311
332
}
312
333
}
313
334
else if ( NSOrderedSame == [imageLoading compare: @" gray" options: NSCaseInsensitiveSearch] )
314
335
{
315
336
if ( [self respondsToSelector: @selector (setIndicatorStyle: )] )
316
337
{
317
- objc_msgSend ( self, @selector (setIndicatorStyle: ), UIActivityIndicatorViewStyleGray );
338
+ // TODO: CY
339
+
340
+ UIActivityIndicatorViewStyle indicatorStyle = UIActivityIndicatorViewStyleGray;
341
+
342
+ [self performMsgSendWithTarget: self sel: @selector (setIndicatorStyle: ) signal :(void *)&indicatorStyle];
343
+
344
+ // objc_msgSend( self, @selector(setIndicatorStyle:), UIActivityIndicatorViewStyleGray );
318
345
}
319
346
}
320
347
else
321
348
{
322
349
if ( [self respondsToSelector: @selector (setIndicatorColor: )] )
323
350
{
324
351
UIColor * color = [UIColor colorWithString: imageLoading];
352
+
325
353
if ( color )
326
354
{
327
- objc_msgSend ( self, @selector (setIndicatorColor: ), color );
355
+ // TODO: CY
356
+ [self performMsgSendWithTarget: self sel: @selector (setIndicatorStyle: ) signal :(void *)&color];
357
+ // objc_msgSend( self, @selector(setIndicatorColor:), color );
328
358
}
329
359
}
330
360
}
0 commit comments