Some Safari features (such as detecting rotation/accelerometer) do not function when a website is loaded in a native app's browser (such as Foursquare). The user agent is still Safar for iPhone... is there any way to detect that the site is actually loading in a native app?
...
Always trying to code better and I am interested in doing TDD for Objective-C and Xcode.
Do you know any post that implement something like Roy Osherove´s "String Calculator"-Kata
Update: trying to find out how to speed up TDD on iOS
...
Hello,
I'm trying to save a selected image to a directory. My code is as follows:
-(IBAction)attachPhotosButton
{
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentModalViewController:imagePicker animated:YES...
I have run into an interesting bug where it appears that when you select a UITableCell it changes all of it's subviews to their highlighed state. This includes my accessoryView which is a UIButton which obviously I only want highlighted when the user presses like a normal button.
I have a friend who went as far subclassing UIButton to ...
This method in my class reads a previously created plist, but when it does NSPropertyListSerialization leaks all over the place. NSDates and NSCFStrings, mostly. Any suggestions on what I can do to prevent this?
- (id)readPlist:(NSString *)fileName {
NSData *plistData;
NSString *errorA;
NSPropertyListFormat format; ...
hi,
I have problems with my coredata sqlite DB, which hosts a book DB. After a crash a user experiences has the problem, that the data isn't shown properly any more in his/her tableview.
This is due to the fact, that the performFetch method returns an error:
[NSFetchedResultsController deleteCacheWithName:nil];
if (![[self fetchedResu...
Hello, guys.
There is a way to have different color bars in a CPBarPlot in just one plot space?
Thanks in advance.
...
I am using core plot in one of my iPhone projects. Is it possible to change the color for a selected slice in a pie chart (using CPPieChartDataSource, CPPieChartDelegate)?
...
The native audio control does not render correctly on the iPhone or the iPhone simulator.
Go to http://www.anmldr.com/audio and see what I am seeing.
The native audio control will cover up the preceding paragraph and the drop shadow is slightly covering the following paragraph. Even if I put it in a containing div and have a margin-to...
what are the Advantages of using protocols in Objective-C, when we require them? I have read the objective-C programming guide it shows mainly 3 advantages:
To declare methods that others are expected to implement.
To declare the interface to an object while concealing its class
To capture similarities among classes that are not hierar...
I use below code for check that searchText exist in name or not but this code is case sensitive means if searchText:"Home" and name :"home and " the result is that searchText doesn't exist in name
how can i remove case sensitive?
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc]init];
NSRange r = [name rangeOfString:searchText];
i...
I'm doing some debugging and leak checking, so I've got some NSLog output in a few of my app's view controllers and such. Then I noticed one particular controller appears to be releasing quite a while after the others, even though the navigation controller is popping it off the view stack. Every other view is immediately unloaded and re...
Hi everyone,
I would like to pop-up a subview pop-up from one of the actions performed by a button placedon a tableview controller.
I initially added a sub-view(initally hidden below the screen) and later want to animate it to
animate and pop-up.
Here is the code for the button action
-(IBAction) finalShareVerse: (id) sender
{
NS...
I have an app with a UITableView and Detail Views. Every detail view contains some text with a background and the text depends on the TableView row selected. The Table data is taken from a .plist. I have tried displaying the text from a .pages file in a UIWebView, but it takes too much time to load and it doesn't take the whole screen (w...
I am developing an iPad app (the "Server") which needs to communicate with up to 4 iPhone/iPod Touches (the Clients). Should I create 4 GKSessions for each of the iPhones? Should I have 1 GKSession which connects all 5 devices, and if I do, will each iPhone be able to "see" the others (Ideally, this shouldn't happen as it will keep thi...
Wondering if anyone has written or come across a good way to log to the console the view that a touch occurred in. I know touchesEnded: can be implemented, but my problem is that something mysterious is blocking touches on my views and I don't know what it is. I would just like to know what is intercepting the touches.
I would like to l...
I'm trying to get a basic image picker/photo taker running in my app and have run into the following error:
*** ERROR: FigCreateCGImageFromJPEG returned -1. Input (null) was 551120 bytes
I have the image picker showing, the camera view works fine.
When I take an image with the camera and select the 'use' button the error appears in...
I am using Three20's TTThumbViewController. Everything works fine except for a padding on top of the thumbnail table which appears to be reserved for the navigation header, except that it takes the place right below the header. How can I get rid of this white space?
...
how to use variable i in place of '1.4'.i want to use variable i to zoom out and zoom in the webview.
[tp stringByEvaluatingJavaScriptFromString:@"document.body.style.zoom = '1.4';"];
Thanks in advance
...
for eg.
NSMutableString * str1 = [[NSMutableString alloc]initwithString:@"matrix"];
NSMutableString * str2 = [str1 retain]; // str2 = matrix - output
NSMutableString * str3 = [str1 copy]; //str3 = matrix - output
what happen when 2nd line execute. are str1 and str2 different objects ? str1 points to "matrix", but is str2 also poin...