![Page 1: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/1.jpg)
![Page 2: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/2.jpg)
Проектирование/исследованиеПрограммированиеОтладкаПрофилирование
![Page 3: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/3.jpg)
Профилированиеизмерениеправка одного места кодаитерация
![Page 4: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/4.jpg)
![Page 5: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/5.jpg)
Например, смена ориентации устройства
![Page 6: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/6.jpg)
iOS 4.3Загрузка shouldAutorotateToInterfaceOrientation: shouldAutorotateToInterfaceOrientation: Поворот shouldAutorotateToInterfaceOrientation: willRotateToInterfaceOrientation:duration: willAnimateRotationToInterfaceOrientation:duration: didRotateFromInterfaceOrientation:
![Page 7: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/7.jpg)
iOS 5.1Загрузка shouldAutorotateToInterfaceOrientation: shouldAutorotateToInterfaceOrientation: shouldAutorotateToInterfaceOrientation: viewWillLayoutSubviews viewDidLayoutSubviews Поворот shouldAutorotateToInterfaceOrientation: willRotateToInterfaceOrientation:duration: viewWillLayoutSubviews viewDidLayoutSubviews willAnimateRotationToInterfaceOrientation:duration: shouldAutorotateToInterfaceOrientation: didRotateFromInterfaceOrientation:
![Page 8: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/8.jpg)
iOS 6.1Загрузка supportedInterfaceOrientations supportedInterfaceOrientations supportedInterfaceOrientations shouldAutorotate supportedInterfaceOrientations viewWillLayoutSubviews viewDidLayoutSubviews shouldAutorotate supportedInterfaceOrientations shouldAutorotate supportedInterfaceOrientations shouldAutorotate supportedInterfaceOrientations shouldAutorotate supportedInterfaceOrientations Поворот shouldAutorotate supportedInterfaceOrientations willRotateToInterfaceOrientation:duration: viewWillLayoutSubviews viewDidLayoutSubviews willAnimateRotationToInterfaceOrientation:duration: shouldAutorotate supportedInterfaceOrientations didRotateFromInterfaceOrientation:
![Page 9: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/9.jpg)
int main(int argc, char *argv[])
![Page 10: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/10.jpg)
![Page 11: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/11.jpg)
![Page 12: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/12.jpg)
![Page 13: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/13.jpg)
![Page 14: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/14.jpg)
![Page 15: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/15.jpg)
Clean Dirty
![Page 16: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/16.jpg)
![Page 17: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/17.jpg)
• Утечки памяти.• Заброшенная память.• Периодическое потребление памяти.
![Page 18: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/18.jpg)
Instruments: VM Tracker
Instruments: Allocations
+
![Page 19: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/19.jpg)
Instruments: Allocations
• Выделения памяти в куче
• Счетчик ссылок каждого объекта
• Heapshot анализ
Показывает:
![Page 20: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/20.jpg)
Instruments: Allocations
• Реальную картину потребления памяти
не показывает:
![Page 21: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/21.jpg)
Instruments: VM Tracker
• Страницы памяти
• Виртуальные зоны памяти
• Реальное потребление физической памяти
Показывает:
![Page 22: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/22.jpg)
Уменьшение потребления памяти
• избавляться от повторных выделений памяти (даже если это небольшие куски памяти)
• делать графику легче
![Page 23: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/23.jpg)
![Page 24: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/24.jpg)
Интерфейс — это инструмент.
![Page 25: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/25.jpg)
Edward R. TufteThe Visual Display of Quantitative Information
Data-ink
![Page 26: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/26.jpg)
Edward R. TufteThe Visual Display of Quantitative Information
Above all else show the data.Maximize the data-ink ratio.
Erase non-data-ink.Erase redundant data-ink.
Revise and edit.
![Page 27: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/27.jpg)
Edward R. TufteThe Visual Display of Quantitative Information
Data-pixel
![Page 28: Илья Седов: Как заставить программу под iOS шевелиться? #uwdc](https://reader033.vdocuments.net/reader033/viewer/2022052412/557f0f56d8b42ac46e8b5102/html5/thumbnails/28.jpg)
Edward R. TufteThe Visual Display of Quantitative Information
It is all right to decorate construction but never construct decoration.