This document provides an overview of real Agile (Scrum) practices, including:
- User stories with acceptance criteria that focus on the user experience
- Sprints of 2 weeks where a team plans work, has daily stand-ups, and completes work to meet a sprint goal
- Regular sprint planning, retrospectives, and reviews to provide feedback and continuously improve the process
- Clear roles like Product Owner to manage the backlog and priorities
This document provides an overview of real Agile (Scrum) practices, including:
- User stories with acceptance criteria that focus on the user experience
- Sprints of 2 weeks where a team plans work, has daily stand-ups, and completes work to meet a sprint goal
- Regular sprint planning, retrospectives, and reviews to provide feedback and continuously improve the process
- Clear roles like Product Owner to manage the backlog and priorities
The document provides an overview of the file system layout and paths for applications on iOS. It discusses how each app has its own home directory containing the app bundle and documents. It also describes how to access common paths like the documents directory and temporary directory. The document then covers using SQLite databases to store and retrieve data, parsing XML, and working with JSON.
The document discusses scroll views and table views in iOS. It provides examples of how to implement scrolling and zooming in a scroll view, including setting the content size and offsets. It also covers the basics of table views, including their anatomy, data sources, cell styles, reusing cells, and responding to user selection. Delegate methods for scroll views and table views are described.
The document discusses iOS application development. It provides details on view controllers, navigation controllers, tab bar controllers and their life cycles. It describes how to create and link view controllers to allow navigation between screens in an app. It also discusses customizing navigation bar buttons, titles and tab bar items. The key topics covered are view controller hierarchies, passing data between view controllers, and using navigation and tab bar controllers to structure app navigation and organization.
The document provides an overview of the file system layout and paths for applications on iOS. It discusses how each app has its own home directory containing the app bundle and documents. It also describes how to access common paths like the documents directory and temporary directory. The document then covers using SQLite databases to store and retrieve data, parsing XML, and working with JSON.
The document discusses scroll views and table views in iOS. It provides examples of how to implement scrolling and zooming in a scroll view, including setting the content size and offsets. It also covers the basics of table views, including their anatomy, data sources, cell styles, reusing cells, and responding to user selection. Delegate methods for scroll views and table views are described.
The document discusses iOS application development. It provides details on view controllers, navigation controllers, tab bar controllers and their life cycles. It describes how to create and link view controllers to allow navigation between screens in an app. It also discusses customizing navigation bar buttons, titles and tab bar items. The key topics covered are view controller hierarchies, passing data between view controllers, and using navigation and tab bar controllers to structure app navigation and organization.
7. создание собственного init
#import "Person.h"
@implementation Person
- (id)init {
// сначала инициализируется супер-класс
if (self = [super init])
{
age = 0;
name = @“Bob”;
// другая инициализация...
}
return self;
}
@end
9. управление объектом
• Выделение памяти - alloc
• Освобождение памяти - dealloc
• dealloc никогда не вызывается
самостоятельно! (почти)
10. подсчет использования
• Живой пока count >0
• alloc и copy создают объект с count=1
• retain увеличивает count на 1
• release уменьшает count на 1
• когда count=0 => dealloc
11. пример
Person *person = nil;
person = [[Person alloc] init];
[person setName:@“John Galt”];
[person setAge:32];
[person castBallot];
[person doSomethingElse];
[person release];
21. Autorelease Pools (in pictures)
механизм autorelease
pp zed nt t
ch
a
ali nib e en pp
n iti ain ev ev it a
au in or
dle Ex
L
pp adm it f n
A Lo Wa Ha
Tuesday, January 12, 2010
22. комильфо
• alloc, new или copy возвращают не
autorelease объект
• остальные - autorelease
23. нет autorelease!
• когда нужно хранить объект долго
• вызываем [object retain]
name = [NSMutableString string];
[name retain];
//...
[name release];
24. cвойства
• Доступ к полям объекта
• Простота getter/setter
• Определение политики использования
• Но! можно переопределить get и set
27. атрибуты свойств
• @property int age;
• @property (readonly) BOOL canLegallyVote
• @property (assign) NSString *name;
• @property (retain) NSString *name;
• @property (copy) NSString *name;
• можно самим создать get и set
28. осторожно с dot
в header:
@property int age;
в implementation:
@implementation Person
- (void)setAge:(int)newAge {
self.age = newAge;
@end
Что произойдет?