Friday, April 9, 2010

Renaming an Xcode project or executable.

Tom's Cocoa Blog-rol masoltam ide az egeszet:

Renaming a project in Xcode 3.x

This seems like it ought to be a simple process provided by Xcode but it is not. Here is how to do it.

1. Copy and rename the project folder

2. Inside the new project folder rename the files ending in .pch and .xcodeproj

3. Right click on .xcodeproj file (it is actually a folder) and select show contents. In the contents folder there should be a file ending in .pbxproj. Open This file in you favorite editor and replace all instances of the old project name with the new project name.

4. Delete the build folder

5. Open the Renamed Xcode project and right click (Control click) on the Target from the groups and files list. Select Info to open the properties panel.

6. Click on the build tab the select packaging from the collection pop up menu

7. Change the value in the product name build setting to the new name.

8. Do Build Clean all Targets.

Changing the executable name

1. Open the Xcode project and right click (Control click) on the Target from the groups and files list. Select Info to open the properties panel.

2. Click on the build tab the select packaging from the collection pop up menu

3. Change the value in the product name build setting to the new name.

4. Do Build Clean all Targets.

Friday, April 2, 2010

isToday

Abizern stackoverfow-s valasza alapjan:

BOOL isToday(NSDate *date) {

NSCalendar *calendar = [NSCalendar currentCalendar];

unsigned unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit;

NSDate *now = [NSDate date];

NSDateComponents *comp1 = [calendar components:unitFlags fromDate:date];

NSDateComponents *comp2 = [calendar components:unitFlags fromDate:now];

return [comp1 day] == [comp2 day] && [comp1 month] == [comp2 month] && [comp1 year] == [comp2 year];

}


Thursday, April 1, 2010

copy + paste > 2 release ugyanazon > EXC_BAD_ACCESS

Arra rajottem, hogy valahol 2 release volt, de azt valamiert nehezen talaltam meg, hogy a custom UITableViewCell dealloc-jaban csinaltam ezt. Igy utolag persze mar tok egyertelmu.