Disadvantage of using NSMutableArray vs NSArray?

If you’re loading objects from a database and you know exactly how many objects you have, you would likely get the best performance from NSMutableArrays arrayWithCapacity: method, and adding objects to it until full, so it allocates all the memory at once if it can. Behind the scenes, they’re secretly the same thing – NSArray … Read more

How to sort an array which contains Dictionaries?

If every element in the array is a dictionary containing a certain key, you can sort the array using a sort descriptor. For instance, if every element is a dictionary containing a key called “name”: NSSortDescriptor *sortByName = [NSSortDescriptor sortDescriptorWithKey:@”name” ascending:YES]; NSArray *sortDescriptors = [NSArray arrayWithObject:sortByName]; NSArray *sortedArray = [array sortedArrayUsingDescriptors:sortDescriptors];

UIActivityViewController – Email and Twitter sharing

For adding subject to the email using UIActivityViewController on iOS6, this is the best solution that anyone can use.. All you have to do is call the following while initializing UIActivityViewController. UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:applicationActivities]; [activityViewController setValue:@”My Subject Text” forKey:@”subject”]; And your UIActivityViewController is populated with a subject.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)