Илья Седов: Как заставить программу под ios шевелиться?...

Post on 16-Jun-2015

437 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Проектирование/исследованиеПрограммированиеОтладкаПрофилирование

Профилированиеизмерениеправка одного места кодаитерация

Например, смена ориентации устройства

iOS 4.3Загрузка shouldAutorotateToInterfaceOrientation: shouldAutorotateToInterfaceOrientation: Поворот shouldAutorotateToInterfaceOrientation: willRotateToInterfaceOrientation:duration: willAnimateRotationToInterfaceOrientation:duration: didRotateFromInterfaceOrientation:

iOS 5.1Загрузка shouldAutorotateToInterfaceOrientation: shouldAutorotateToInterfaceOrientation: shouldAutorotateToInterfaceOrientation: viewWillLayoutSubviews viewDidLayoutSubviews Поворот shouldAutorotateToInterfaceOrientation: willRotateToInterfaceOrientation:duration: viewWillLayoutSubviews viewDidLayoutSubviews willAnimateRotationToInterfaceOrientation:duration: shouldAutorotateToInterfaceOrientation: didRotateFromInterfaceOrientation:

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:

int main(int argc, char *argv[])

Clean Dirty

• Утечки памяти.• Заброшенная память.• Периодическое потребление памяти.

Instruments: VM Tracker

Instruments: Allocations

+

Instruments: Allocations

• Выделения памяти в куче

• Счетчик ссылок каждого объекта

• Heapshot анализ

Показывает:

Instruments: Allocations

• Реальную картину потребления памяти

не показывает:

Instruments: VM Tracker

• Страницы памяти

• Виртуальные зоны памяти

• Реальное потребление физической памяти

Показывает:

Уменьшение потребления памяти

• избавляться от повторных выделений памяти (даже если это небольшие куски памяти)

• делать графику легче

Интерфейс — это инструмент.

Edward R. TufteThe Visual Display of Quantitative Information

Data-ink

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.

Edward R. TufteThe Visual Display of Quantitative Information

Data-pixel

Edward R. TufteThe Visual Display of Quantitative Information

It is all right to decorate construction but never construct decoration.

top related