operator class:
#import <Foundation/Foundation.h>
@interface operator : NSObject {
int number;
}
@property int number;
@end
@implementation operator
- (id)init{
self = [super init];
if (self) {
[self setNumber:0];
}
return self;
}
@synthesize number;
@end
main.m:
#import <UIKit/UIKit.h>
#import "operator....
answer.h:
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "operator.h"
@interface answer : NSObject/* Specify a superclass (eg: NSObject or NSView) */ {
IBOutlet operator *operator1;
IBOutlet operator *operator2;
IBOutlet UILabel *answerLabel;
IBOutlet UISegmentedControl *operation;
}
- (IBAction)compute:(id)s...
I am developing an iOS application and am having some issues deciding how to approach a problem.
I am using two UITableViewControllers to display different views of the same data. One is a master list, and the other only contains items which are marked as "favourite". Also the items are variable height, so I am using "heightForRowAtInde...
I am working on a project that needs some hidden interface of iOS4. I want to hook objc_msgSend to have some hints. Any idea?
...
I want to nlist(/usr/lib/libobjc.dylib,...),but it won't work since there is no libobjc.dylib on ios4. Any ideas?
...
I (and you) know how to play audio in background.
But my question is like that,
some music play apps replace iPod icon which is shown on the first background app page with their icon while they are playing audio in background.
How can I do that?
...
I am developing an app which uses gps. i need a high accuracy so i used kCLLocationAccuracyBestForNavigation for the desiredAccuracy.
when i am running the app, the follwing method gets called as expected.
(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLoca...
I'm working on an iPhone game using OpenGL ES. I recently updated my iPhone 3G to iOS4, and ever since the update, when I've been play-testing my app I've been getting very high latency on my accelerometer and touch events -- my phone will often respond a second later than it should, which makes the game unplayable. This doesn't occur al...
Is there a way to enable rotation but without the animation as you turn the device from portrait to landscape?
I'm looking at:
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
... but I don't see how I can set the "duration" property to 0 and thus elimi...
For example as Download Meter app does. Can I track packages dispatched? Does iOS a traffic tracking system that I can poll somewhere?
...
How can I tell if the application is running on iPhone 4 or iPhone 3GS or an iPad?
I want to determine if which hardware I'm using and then provide additional functionality if it's an iPhone 4 (such as using the video light or gyro-sensor).
Any help would greatly be appreciated.
Thanks
PS: I'm looking to determine this programmatical...
using some of the nifty new APIs in iOS4 i am trying to capture input from the iPhone's camera and microphone and save it to a file. below is the code i am using.
AVCaptureSession* captureSession = [[AVCaptureSession alloc] init];
AVCaptureDevice *audioCaptureDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeAudio];
AVCapt...
How do you calculate the focusPointOfInterest (a CGPoint value between 0,0 and 1,1) for an given AVCaptureDevice?
I've been following the code samples from the latest WWDC but I really don't understand how to calculation is being made. Also, my application is sitting in landscape vs. portrait (as in the sample) ... so in addition to no...
In my application, MFMailComposeViewController works fine but creating a new instance of MFMessageComposeViewController fails.
Here is the code for both:
-( IBAction)sendSMS: (id)sender
{
MFMessageComposeViewController *picker = [[[MFMessageComposeViewController alloc] init] autorelease];
picker.messageComposeDelegate = self;
NSAr...
Hi iPhone/iPad Developers,
I want to confirm a feature , a client asks to me develop an app with a feature that it is able to stop sms messages to the phone for a certain period of time. I have done some research and found a link pasted below ( and the screen shot of the page ) in which the author of a renown iPhone App development book...
I am calling UIGraphicsGetCurrentContext() in -drawRect: of a UIView inherited class. Then view is added on an scrollView. In -scrollViewDidEndZooming: withView: atScale: I am initiating the view's -setNeedsDisplay.
So calling UIGraphicsGetCurrentContext() gives memory warning.
Please anyone help me in fixing this.
...
Has anyone ever had the problem that a UIScrollView, which gets moved by [UIScrollView setContentOffset:...] doesn't "remember" it's new position? It however does, if the user scrolls via touch-and-drag.
Symptoms: If the UIScrollView doesn't remember the new position, it "flips" back to the original position it last remembers (which is ...
Hi,
I am working on a App that makes use of a JSON API and I am Using the JSON for Objective C Framework to get the Data into a NSDictionary. The dictionary loos like this:
({
admitted = "<null>";
agreed = "<null>";
"area_id" = 1;
"area_name" = "Digitales, Urheber-/Patentrecht, Datenschutz";
created = "2010-08-17 12...
Currently I installed XCode_3.1.4_iPhone_SDK_3.1.2 on Mac OSX 10.5.8, and I plan to buy an iphone 3gs 8G iOS 4 in the following days. I heard from friends that iOS 4 can't be downgraded to 3.x!
My question is, can XCode_3.1.4_iPhone_SDK_3.1.2 deploy app to iOS 4 device via iDP? Should I upgrade system to 10.6.4 and install Xcode_3.2.3_i...
hi,
Since iPhone 4 do takes the application to background thread, Is there a way to quit the application so that it is not in the background ? can we have a exit button in the screen ???
...