Как потянуть UIImage или непосредственно в-drawRect:?

Попробуйте , WANem

WANem является Эмулятором Глобальной вычислительной сети, предназначенным для обеспечения реального опыта Глобальной вычислительной сети / Интернет, во время разработки приложений / тестирующий по среде LAN.

46
задан Winston 16 August 2014 в 01:56
поделиться

2 ответа

Вызов [img drawInRect: rect]; .

84
ответ дан 26 November 2019 в 20:13
поделиться

BTW, you shouldn't load the image file in the drawRect method. Because the method is called whenever the view is required to update. Therefore, it (of course, loading procedure) may be called many many times during running. (Furthermore, OS2.x's imageNamed method has a bug -- not cached the image and leaked it.)

Therefore, you'd better to load the file in the initialization method, not in the drawRect.

30
ответ дан 26 November 2019 в 20:13
поделиться
Другие вопросы по тегам:

Похожие вопросы: