@constant kAudioSessionProperty_AudioInputAvailable
A UInt32 with a value other than zero when audio input is available.
Use this property, rather than the device model, to determine if audio input is available.
A listener will notify you when audio input becomes availabl...
I have found an existing open source library that I would like to include in my iPhone project (the unrar source code found here: http://www.rarlab.com/rar_add.htm ).
I have compiled this source as a linked library on my Mac with "make lib" which creates the libunrar.so file just fine.
These are the makefile settings for that target:...
I have the following core data model with two entities:
entity "item" which holds name, date, description and a to many relationship "image". image is optional.
entity "image" holds url, name and relationship to one item.
I load the executed Fetchrequest into this NSArray "entityArray"
This is what I do to display my data in a UITabl...
I have several instances of a UIControl class Foo being instantiated, one instance corresponding to each cell in a UITableView. The Class has:
BOOL selected;
UIImageView *imageView;
UIImage *imageOne;
UIImage *imageTwo;
I've assigned each instance a tag:
foo.tag = indexPath.row;
I would now like to reference the UIImageView.image ...
In the header, it is defined like:
#if __LP64__ || (TARGET_OS_EMBEDDED && !TARGET_OS_IPHONE) || TARGET_OS_WIN32 || NS_BUILD_32_LIKE_64
typedef long NSInteger;
typedef unsigned long NSUInteger;
#else
typedef int NSInteger;
typedef unsigned int NSUInteger;
#endif
So does an UInt32 fit without problems into an NSUInteger (an unsigned int...
How can I check if a string (NSString) contains another smaller string?
I was hoping for something like:
NSString *string = @"hello bla bla";
NSLog(@"%d",[string containsSubstring:@"hello"]);
But the closest I could find was:
if ([string rangeOfString:@"hello"] == 0) {
NSLog(@"sub string doesnt exist");
} else {
NSLog(@"exist...
Is it possible to still play sound / music even if audio has been interrupted, or more precisely: even if MyInterruptionListener got called from the OS with the interruption state kAudioSessionBeginInterruption ?
Yeah I know that's not good idea to do. But want to know anyways.
...
Hi,
I would like to make an if command that checks the value of my UISearchBar in that way if the value of the UISearchBar is equals to " " or multiple spaces without words and chars, an alert will popup.
Well, I don't need help with the creation of the alert but I do need help with the if command and the spaces.
I know how to do it wit...
I'm doing a bunch of core data inserts and after 20k or so inserts with saves every 1-2k I get this error:
Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection <NSCFSet: 0x1b0b30> was mutated while being enumerated.'
I'm trying to figure out which NSSet is causing this. I've done a search and the onl...
I'm trying to put a UIPageControl inside a cell (there's nothing else in the cell), but I have two problems:
The dots are aligned at the top-left of the cell, so you only see the bottom-right quarter of the first dot, and the bottom half of the other dots (like the first dots center is 0, 0).
Unless you tab the cell to select it (goes ...
When I compile my iPhone app, xCode gives "duplicate symbol" error for my variables in MyConstants.h
I thought if I used:
#import "MyConstants.h"
it would avoid that?
But I still have the problem.
Added info:
The error occurs during "linking".
(I'm just using xCode's "Build and Go" button.)
I also tried the (unnecessary with #im...
If I have a image size 1024*768, but I want to show a 100*100 square located on 200, 200. What is the simplest way to do it? Thz u.
...
I need to create a UIToolbar that has two UIBarButtonItems. The 1st button must be centered and the 2nd item must be right aligned.
I understand and use Flexible spacing and it works great when I need to balance buttons across the UIToolbar, but with only two buttons, I can't seem to perfectly center the middle button. I've even initial...
I have a UIPickerView on a UIView. I've implemented its protocol in the .h and delegates in the .m files:
<UIPickerViewDataSource, UIPickerViewDelegate>
In IB, I've connected the above to the picker, which I also have an IBoutlet for. The methods look like this:
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)thePicker...
Hey Everyone,
I am looking for a good tutorial or sample code, that would show how to crop an image taking from iphone camera
something in lines of
http://img192.imageshack.us/img192/8930/customcropbox.jpg
but you would control the corners with your fingers
any tip would be greatly appericated, as i am new to iphone dev.
Thank...
I have some twitter code I modified from: http://amanpages.com/sample-iphone-example-project/twitteragent-tutorial-tweet-from-iphone-app-in-one-line-code-with-auto-tinyurl/
His code used view alerts to login and post to twitter but I wanted to change mine to use windows. It is mostly working and I can login and post to Twitter. However,...
I have built a class which has a few methods in it, once of which returns an array, lets call this class A.
I have a second class, class B, which I would like to use to call the method from class A.
But, now how do I call that method from class A and store what is returned in a var in class B? Do I have to initiate the class? I have ...
I have noticed in a number of apps they let you see a zoomed in view of where you are dragging just like the way it is on a UITextField (screenshot attached) but it works over images etc.. Does anyone know if there is an easy way to achieve this? Since a number of apps use it I figured that there might be something built in or an easy w...
I want to display a login view to my users if they are not logged in and the main view if they are.
In my header file I define a variable to hold the logged in status
#define loggedIn 0
I figure I should then reference this in the initWithNibName method and then decide which nib to load.
Is the right way of doing it?
If so can some...
Mac OS X Snow Leopard's been in stores for a while now. Sadly, the Mac that I'll be developing on is still running Leopard, and I don't have admin access to the Mac either so I can't do anything about the OS version. Therefore I can only use iPhone SDK 3.1.3, which we've obtained thanks to this answer, to start building apps on that Mac....