Thursday, December 20, 2012

Sequence of Different animations


Refer
http://stackoverflow.com/questions/11737658/how-to-chain-different-caanimation-in-an-ios-application

removeObjectAtIndex


removeObjectAtIndex:

Removes the object at index .
- (void)removeObjectAtIndex:(NSUInteger)index
Parameters
index
The index from which to remove the object in the array. The value must not exceed the bounds of the array.
Important: Raises an NSRangeException if index is beyond the end of the array.
Discussion
To fill the gap, all elements beyond index are moved by subtracting 1 from their index.
E.g:
    CAPropertyAnimation * nextAnimation = [[self sequenceOfAnimations] objectAtIndex:0];
    [[self sequenceOfAnimations] removeObjectAtIndex:0];

Assigning nextAnimation with object at index 0 and after that we removed.Thing is all objects beyond index 0 are shifted one place left to fill the gap.So the above two lines act like a queue,always first object will be removed.

sequenceOfAnimations array has contents in this fashion
[obj1,obj2,obj3,obj4,obj5,nil];
removeObjectAtIndex:0
now sequenceOfAnimations will be [obj2,obj3,obj4,obj5,nil];
removeObjectAtIndex:0
now sequenceOfAnimations will be [obj3,obj4,obj5,nil];




Tuesday, December 18, 2012

UnCategorized compilation error in StoryBoard


The problem is that you've got IBOutlets that link to prototype cells.
Note that prototype cells are just that: prototypes. So you can 

have multiple instances of each. 

Therefore Xcode won't know which instance to link the 

IBOutlet variable to.
You'll have to wait until the cells are instantiated inside 

cellForRowAtIndexPath to assign the properties

courtesy: 

http://stackoverflow.com/questions/10527602/uncategorized-compilation-failed-error-in-ios5-storyboard

Tuesday, December 11, 2012

Rechability class

1.To Disable ARC
Targets->BuildPhases->CompileSources->select the files->double click and type -fno-objc-arc for the required files

2.undefined-symbols-for-architecture-i386-scnetworkreachabilitysetcallback
Including SystemConfiguration.framework will fix this problem

3.Tableview not displaying anything,not triggering to call datasource and delegate methods
Probably Tableview's delegate and datasource might not have set properly.
Set the delegate and datasource for the table view.

Monday, December 10, 2012

All about UIScrollView

Refer: http://developer.apple.com/library/ios/documentation/WindowsViews/Conceptual/UIScrollView_pg/UIScrollView_pg.pdf

Basic View Scrolling
No Need of Delegation and subclassing.
Just set The ContentSize
To Support Pinch to Zoom
Use Delegation method
Double tap and Two finger tap
Code in content view
Paging mode
No Delegation and no subclass.
simply enable paging mode and set the content size

Scrolling the scroll view content
1.Dragging
User touching the screen and dragging
2.Flick gesture
Variation of Dragging.In this user makes initial contact with the screen and drags in the direction of desired scroll and lifts off from the screen.This not only causes scrolling but creates a momentum which depends on the speed of user's dragging that causes scrolling to continue even after gesture is completed.