I need to guarantee that the same thread performs various actions at arbitrary times. First the thread needs to initialize a library, then I want the thread to sleep until work needs to be done and upon user input, I need to be able to pass selectors or blocks for execution.
How can I setup an NSRunLoop to sleep after initialization? Af...
I'm not sure if this is exactly what I'm looking for,
but I've noticed the iOS4 media controls (double tap home button and slide left to see them) have some control over the HTML5 Audio elements, but is there any way to do a callback for previous and next songs?
if so does anyone know the way I can tap into these callbacks? :)
Thanks ...
Hello stackoverflow,
I am trying to build a custom table view using a cell that I built in IB. I am getting a strange error:
<BroadcastViewController 0x4b4f5f0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key postText.
Everything is wired up correctly in IB to the cell controller. Not really s...
When a hardware keyboard is used with iOS, pressing tab or shift-tab automatically navigates to the next or previous logical responder, respectively. Is there a way to do the same programmatically (i.e. simulating the tab key rather than keeping track of the logical order manually)?
...
Can you describe the naming convention difference between a method that returns an object it has allocated for the caller (and that the caller should release), and a method that returns an autorelease object?
If you declare a property with a retain attribute, do you need to release the property before you set it to nil?
What does the ...
Hi I need to initialize an NSObject at a particular location that I specify(through a void* pointer, for example). For a little bit of context, I am writing a sqlite3 aggregate function. To keep temporary results from this function, I have to call a sqlite3_aggregate_context function, which allocates a block of memory for me. I want to s...
I have a UIView that I set up to respond to pinch gestures and change its size, except, once you enlarge it and then try and pinch it again, it jumps to its original size (which just so happens to be 100x200). Here is the code:
@implementation ChartAxisView
- (id)initWithFrame:(CGRect)frame {
if ((self = [super initWithFrame:frame...
Hey guys,
I have a couple of properties declared in my header file, and just wondering when they have to be released. I'm currently doing them in my "dealloc" method, but getting the EXC_BAD_ACCESS error when doing so.
Here's my code
@property (nonatomic, retain) NSTimer *timer;
@property (nonatomic, retain) NSString *closeimage;
@pr...
i am trying to access videos in iPhone library using AssetsLibrary Framework with the help of following code...but when i run the application the code is not working...the array assets is still empty?? what am i doing wrong??
btw my iPhone is a 3G upgraded to iPhone 4.1.(but assets framework is not giving any error)
NSMutableArray *ass...
Hello,
I am using an image to display the whole content of a UITableViewCell and it's set using the backgroundView property.
My problem is that it is always scaled to fit the cell. Is there a way to disable scaling in this case, so I can provide the 480 pixel version only and it just gets cropped when orientation is portrait?
I'm doin...
What programming languages can one use to develop iPhone, iPod Touch and iPad (iOs) applications?
Also are there plans in the future to expand the amount of programming languages that iOs will support?
...
I have a lot of code that I've written, and finally have come up with the correct branding. How can I rename my project and app in XCode?
...
I see this log in the console when I run my app:
CALayer position contains NaN: [nan -0.5]
The app consists of a UITabar of which the first tab is a UINavController. In the NavController I'm launching the AddressBookPicker. In the Addressbook picker I'm only choosing to show phone numbers.
When I choose on a contact that has only email...
Hey guys,
I'm using Apple's example code for AVCaptureSession, and the UIImage that gets created is completely blank. This only happens on the iPhone 3G, along with a unique error that shows up on console that says -
Error: CGDataProviderCreateWithCopyOfData: vm_copy failed: status 2.
I've researched the error online and found this St...
The following seems simple enough. There's a superclass with an ivar, and a subclass which accesses the (@protected) superclasses ivar:
// Testclass.h
@interface TestClass : NSObject {
NSString *testIvar;
}
@end
//TestClass.m
@implementation TestClass
@end
//TestSubclass.h
@interface TestSubClass : TestClass {
}
@property (no...
I would like to stream video from an iPhone camera to an app running on a Mac. Think sorta like video chat but only one way, from the device to a receiver app (and it's not video chat).
My basic understanding so far:
You can use AVFoundation to get 'live' video camera data without saving to a file but it is uncompressed data and thus...
Hi, i got a problem in [NSUserDefaults standardUserDefaults] in iOS4.0.
I saved some states by using [[NSUserDefaults standardUserDefaults] setObject:self.listData forKey:@"listData"]; in applicationDidEnterBackground: and applicationWillTerminate: methods. And i retrieved the data by using NSMutableArray *listData = [[NSMutableArray al...
Hi,
I have a small problem I can't seem to solve. I have a XML page with the following content:
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfCategory xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://api.tradera.com">
<Category Id="1612" Name="Category 1">
<Categ...
Hello heroes,
I'm new to iOS programming, so please allow me to ask stupid questions if it is :)
I have a program, using UIWebView to load HTML page and display to the end users.
The page is quite simple,
<select>
<option>A</option>
<option>B</option>
<option>C</option>
<option>D</option>
</select>
WebView controlle...
Hi,
I have a simple application which accesses cookies from a webpage using a standard NSURLConnection. The existing version of the application works fine (developed for 3.0), however, I have modified the app (making it fully iOS4 compatible) and I now recieve the following warning in the log:
CFHTTPCookieGetCreateDate is depr...