I am grappling with adding an NSData object to a NSMutable array.
The code is executing fine but it is not adding the objects in the array.The code is as follows:
NSData * imageData = UIImageJPEGRepresentation(img, 1.0);
int i=0;
do{
if([[tempArray objectAtIndex:i] isEqual:imageData])
{
[tempArray remo...
I'm having a hard time undestand a couple of the methods in UIViewController, but first I'll say what I think they are meant for (ignoring interface builder because I'm not using it):
-init: initialize non view-related stuff that won't need to be released in low memory situations (i.e. not objects or objects that can't be recreated ea...
Which classes / frameworks must I look at? I don't want to use 3rd party libs, so just plain old, boring default solutions to read / write text files and stuff like that... Is there something like a File IO framework?
...
I am still finding my feet with objective-c and was wondering if its acceptable to use @property on the two objects below.
#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
@interface MapViewController : UIViewController <MKMapViewDelegate, CLLocationManagerDelegate> {
CLLocationManager *locationManager;
IBOutlet MKMapView *goo...
I read somewhere that in a programmatically created view in a UIViewController, not using Interface Builder, -viewDidLoad and -viewDidUnload should not be used. Is this right? Why? Where would I release subviews that I have retaining properties of? Or should I just not use properties for them?
EDIT: Read my comments on Rob Napier's answ...
I'm trying to create a tableview which contains different types of table cell but I'm stuck. How do I return a different type of cell dependent on the row number in the...
(UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath {
function.
...
Has any one encountered any open source iPhone UI Libraries that are good to use in projects to replace some of the standard controls with ones that are more customizable?
...
Hi All,
I'm trying to recreate this UISearchBar (as seen in the Table Search example code):
All the examples I've seen to do this involve using a xib, however I need to do it programmatically. The problem is changing the tint color also changes the cancel button's tint:
Any ideas?
...
NSString *urlAddress = @"http://www.test.com/test.jsp?Query=哈囉";
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
NSURLResponse* myURLResponse;
NSError* myError;
NSData* data = [NSURLConnection sendSynchronousRequest: requestObj returningResponse:&myURLResponse error:& myErr];...
One thing I have in mind is, that datasets in Core Data (or lets say: managed objects) have no ID like known from other databases such as MySQL. Also, they're not in a specific guaranteed order.
What else makes Core Data much more "special" compared to working with a relational database like MySQL? Besides the whole object graph persist...
I have been working on an iPhone app that has a feature of uploading photos to TwitPic. I have it working with basic authentication.
I am trying to get it working with OAuth. I am getting authentication errors. I have studied very carefully the TwitPic documentation.
I am authorising the app by displaying a UI Web View and the it re...
I am having an issue with a uiwebview within a scrollview. In this scrollview, there is a "header" view at top and "bottomview" which is the webview. I am loading the data into the webview using loadHTMLstring method. What I am trying to do is that when I zoom, it should zoom in only on the bottom portion, not the top part. This is v...
I'm trying to animate a view sliding into view and bouncing once it hits the side of the screen.
A basic example of the slide I'm doing is as follows:
// The view is added with a rect making it off screen.
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationDuration:0.07];
[UI...
Hello,
I know this question has been floated, but there are not any answers. In Objective C, is there a way to return signal strength?
Thanks in advance,
Rob
...
At first time i call the timer like this in Third viewcontroller
timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(targetMethod) userInfo:nil repeats:NO];
Then timer called the targetMethod
-(void)targetMethod
{
First * sVC = [[First alloc] initWithNibName:@"First" bundle:[NSBundle mainBundle]];
[se...
Hi all,
I don't understand what's wrong in my very simple application with device rotation :
I built my view with interface builder. (See screen capture here)
I specified <key>UIInterfaceOrientation</key><string>UIInterfaceOrientationLandscapeRight</string> in my info.plist file.
I had a (BOOL)shouldAutorotateToInterfaceOrientation:(U...
Sometimes when I try to call [myController takePicture] on a UIImagePickerController object, I receive this response:
UIImagePickerController: ignoring request to take picture; image is already being captured or camera not yet ready.
I believe it's not because an image is already being captured because I launch the camera and it fails...
I am trying to use the NSNotificationCenter to get UIMenuControllerDidShowMenuNotification from a UIWebView. I have the following code in my ViewDidLoad method:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(menuControllerWillHide:) name:UIMenuControllerWillHideMenuNotification object:nil];
[[NSNotificationCen...
I have my standard video tag which is playing fine in Chrome;
<video width="x" height="y" src="video.mp4"></video>
The video itself plays fine on the iPhone, however, is there no way to listen for events? Any kind of event? I'd like to use the 'ended' event, but even a 'click' or 'play' would be helpful!
The standard
video.addEventL...
More specifically, does CL require the user to have a data connection? Or is it possible to just use the phones service connection?
Thanks!
...