I have several NSComboBoxes created in Interface Builder, and one created programmatically.
The NSComboBoxes created in Interface Builder are perfect. I have their Value bound to the Shared User Default Controller, and when their view is opened they are sitting there with the correct value. Importantly, this value is shown as "normal"...
Hi, I want to write a program for iPhone 4 that uses its camera flash.
Is that possible?
If so, which class should I work with?
Thanks in advance,
sagiftw
...
I'm a complete newbie to Objective-C/XCode and it's been a bit daunting so far. I wanted to get my hands dirty by building something that incorporates a few concepts.
All I want to do is have a table which is populated by rows from a SQLite database. The table should have reordering capability, I want to have a starring facility, and th...
Hi I'm trying to build a simple chat client between two ipod touches Just as a start to learning Bonjour.
I connect the two devices fine and everything seems like it should work. I can send the data with no problems (no error) , but When I should then receive the data and I dont. When I look in the log, I see "GCKSessionEvent_IncomingO...
I need to create a set of objects (the types and values don't matter, as long as they are distinct) that have very fast comparisons. I'm currently using NSString for comparison, but I imagine there must be something faster. NSNumber maybe? Perhaps I could do an primitive comparison using its int value?
...
Here's my code of generating data
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
// Insert code here to initialize your application
[array initWithCapacity:20];
}
- (IBAction) readlog:(id)sender {
for (int i = 0; i < 20; i++) {
NSDictionary *d = [NSDictionary dictionaryWithContentsOfF...
What follows is an initializer method. It creates a Movie structure from a file, with an eye to extracting the raw pixels for processing, as per Apple QA1443. This is then wrapped in a QTMovie – sourceMovie = [QTMovie movieWithQuickTimeMovie: ...] – for convenience.
After initializing such an object, the second method is called, and we ...
Hi,
I have a very classical class which contains buttons and label, etc... :
@interface ExerciseViewController : UIViewController {
// Hardcoding for outlets to XIB file
// Outlets can be passed only as singe variables in Interface Builder.
// Therefore, we can only declare stupid variables, not arrays of buttons.
// Bid array
// La...
Is there a way to detect touch events from another class than the Layer itself.
I'm trying to have a state controlling the interaction, adding listener to the layer itself if needed instead of have the layer call a function on the current state, which might be a noop.
Is the a way to use such a thing?
...
I want to swap where player is pointing to here. I'm doing it wrong for sure, but can't figure out why. I've also tried using (Player **)player in the signature and &player when I called it. Any ideas?
- (void)handleResult:(Result)result forPlayer:(Player *)player inLineup:(Lineup *)lineup
{
switch (result)
{
case Result...
I am using the EGOTableViewHeader class provided from:
http://www.drobnik.com/touch/2009/12/how-to-make-a-pull-to-reload-tableview-just-like-tweetie-2/
I am able to display my view at the top of my UITableView:
refreshHeaderView = [[EGORefreshTableHeaderView alloc] initWithFrame:CGRectMake(0.0f, 0.0f - self.tableView.bounds.size.heigh...
how do I set a NSString using a value from a UILabel? so far i have this but it crashes:
NSString *theScore =[[NSString alloc]initWithFormat:@"%@",scoreX.text];
scoreX is a UILabel.
can anyone help?
thanks in advance
...
I have the following code (both items and itemsCopy are NSMutableArray's):
//DO: populate items w/ 30 elements
[self.itemsCopy addObjectsFromArray:self.items];
//DO: remove all elements in items
Results
Begin Pass 1:
itemsCopy = 0
items = 30
End Pass 1:
itemsCopy = 30
items = 0
Begin Pass 2:
itemsCopy = 0
items = 30
End Pass 2:
it...
How do i update an existing NSString variable with a new formatted string?
for example i have a variable like this:
String1 = [NSString new];
I want this string object to be updated from time to time with new formatted contents using the standard printf format.
I can initialise a new NSString using the initWithFormat: message but th...
I have found a crash in an iPhone application with target iOS 4 that changes depending on the type of build.
The debugger is giving me nothing much to go on, it stops at
UIViewController *result = [self factory](self);
with EXC_BAD_ACCESS. self is a class inheriting from NSObject (shown below as NSObjectInheritor). Zombies are ena...
just curious to know if it would return (id) or (parent class) or something else.
...
How to read the content of this XML?
<Locations>
<Location>4</Location>
</Locations>
I can parse it, and it works, but I can't access the value of Location (4). I'm using:
ZoneCheck *azone;
NSString *url1 = [NSString stringWithFormat:@"%@", azone.location];
...
HI,
I used the autoroation its working fine in both Landscape and potrait but, I had a button in my navigation bar when I click on to the button an action sheet will generate.when I rotate the view into lanscape the action sheet is not rotating in lanscape mode.
The code that I used is below what's wrong I am not getting :
UIToolBar *...
I have a TabBar which has been created programmatically. In the view controllers of this tab bar I am trying to reduce the size of navigation bar using -
"self.navigationController.navigationBar.frame = CGRectMake(0, 20, 320, 30);"
For the first time the view controller loads the navigation bar is displayed with the dimensions specified...
I'm trying to teach myself but am struggling with how to store something like an NSArray inside an NSDictionary.
Let's say hypothetically you had a NSDictionary for recipes:
Let's say the NSDictionary had keys like:
Spaghetti,
Fettucine Alfredo,
Grilled Chicken Salad
And the NSDictionary had an NSArray which was simply a list of ingr...