Hi everybody,
I am new to this topic and require some guidance in implementing Apple Push Notification in my application. I have created my appID and also configured Apple Push Notification for the same. I have downloaded the provisioning profile and installed the app on the iphone. I have also written the following code provided by App...
Hi there,
got a little problem with receiving the contents of a xml file (using TouchXML).
My first query works very well, looks something like this:
NSString *url = [NSString stringWithFormat:STATION_ID, latitude, longtitude];
CXMLDocument *rssParser = [[CXMLDocument alloc] initWithContentsOfURL:[NSURL URLWithString:url] options:0 er...
Hello,
I have the problem that I have created a delegate protocol, but the necessary methods are not executed, although I have implemented the protocol in my header file. Here are the detailed explanation:
I created an instance of my ViewController (TimeLineViewController), which will be displayed. This ViewController contains a UITable...
Okay, maybe I am looking to hard or been up to long but this is driving me crazy. I am trying to display the percentage on a View but it always shows as 0. What simple thing am I doing wrong?
int iNumber;
float fNumber;
fNumber = 3/ 24;
iNumber = 3 / 24;
NSLog(@"iNumber: %d", iNumber);
NSLog(@"fNumber: %f", fNumber);
NSNu...
Hi. How would I take a file in the application's directory (the same folder the .app is in), and get it's absolute path. Say the relative path is "Data/file.txt," how would I use Objective C to get that as an absolute path? I have the user enter their home folder name, if that is any help.
Please help,
HiGuy
...
I'm having some issues where my posted notification:
[[NSNotificationCenter defaultCenter] postNotificationName:@"MobileProviderChanged"
object:self.selectedProviderID];
Is not being trapped by my observer:
[[NSNotificationCenter defaultCenter] addObserver:self
...
Hi,
Imagine a table view listing some recipes. Each time the user taps on a recipe a new table view is loaded listing receipe ingredients.
To get the information, I'm asynchronous calling a REST API using:
NSURLRequest *request = [NSURLRequest requestWithURL:url
cachePolicy:NSURLRequestReloadIgnor...
Hello,
I get a compiler error when trying to synthesize a bool array like this:
// .h
#import <UIKit/UIKit.h>
@interface SomeViewController : UIViewController {
BOOL boolArray[100];
}
@property (nonatomic) BOOL boolArray;
@end
//m
#import "SomeViewController"
@implementation SomeViewController
@synthesize boolArray;
@e...
In an attempt to fix a memory leak, I am trying to implement this code in my .m file:
AVAudioPlayer *audioPlayer;
- (AVAudioPlayer *)audioPlayerWithContentsOfFile:(NSString *) path {
NSData *audioData = [NSData dataWithContentsOfFile:path];
AVAudioPlayer *player = [AVAudioPlayer alloc];
if([player initWithData:audioData err...
I have a Cocoa App that I have manually added core data to. I setup the table in Interface Builder to list the entities from the data (with NSArrayController), and this is working just fine. The problem is when I insert a new entity (via code) the table does not update until I restart the app.
What do I have to do after inserting an en...
How do I remove double quotes from an NSString. Example:
//theMutableString: "Hello World"
[theMutableString replaceOccurrencesOfString:@"\"" withString:@"" options:NSCaseInsensitiveSearch range:(NSRange){0,[theMutableString length]}]
It doesn't seem to work, maybe since I had to escape the " in the replaceOccurrencesOfString?
...
I have the code [window addSubview:[self.mvController view]]; where mvController is a view controller and whenever I run the program (device and simulator) it crashes.
...
this program crashes if i uncomment the release statements. i get that i am overreleasing and realized that quickly. but, just to test zombies, i turned them on (NSZombiesEnabled = YES and CFZombieLevel = 16) and the program runs fine and throws no exceptions.
what gives? i thought turning on zombies would have just told me what a doofu...
Having taken no explicit steps that I'm aware of, Xcode has decided that one of my class implementation (.m) files is of unknown file type. So I've suddenly lost all colors/highlighting/autocomplete and (more problematically) the ability for the debugger to recognize breakpoints in that file only.
Right-click on the file and doing Get I...
I want to define a min and max methods in a Utils class.
@interface Utils
int min(int a, int b);
int max(int a, int b);
@end
But I don't want to have named parameters. It would be a too heavy notation. I wanted to use the C-style definition. But then [Utils min(a, b)] as a call doesn't work. What is my problem?
Thanks in advance fo...
Update: this question is bunk. Move along, nothing to see here. You can set the value of the password text field from either JS or ObjC. I was wrong.
I have a WebKit-based Cocoa app which loads an HTML document containing an HTML form in a WebView. The HTML form contains a password text field like:
<form name="foo">
<input type="pa...
Hello, I would like to have an UIImageView that flickers. I thougt I can make it with CoreAnimation and the alpha-value. I tried this:
for (int a = 1; a <= 100; a++) {
schwarz.alpha = 0.7;
[UIView beginAnimations:nil context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
[UIView setAnimationDuration:1];
...
I am having a baffling issue while trying to fill an NSMutableArray with UIImages.
CGBitmapInfo bitmapInfo = kCGBitmapByteOrderMask;
CGColorRenderingIntent renderingIntent = kCGRenderingIntentDefault;
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
while(...) // <--- Iterates through data sets
{
CGDataProvide...
I just Don't understand how to use a boolean operator inside a switch statement
switch (expression) {
case > 20:
statements
break;
case < -20:
statements
break;
}
Edit:
I don't want an If () statement.
...
I'm writing preferences for my app which registers it for launch at login (using LSSharedItemList API). All goes fine and my app toggles its presence in user's login items upon checkbox status. Now I want to tackle another problem when user actually removes the app from "Login items" in Accounts.prefPane.
Using Notification Watcher I se...