My setup is a UIScrollView in the center of the screen (on the iPhone - like 300x400 positioned in the center) that contains a UIView of the same width, so it scrolls it vertically. In this UIView i draw custom subviews with labels etc (it's a scoreboard with various colors).
What i'd like to have is some shadow below my UIScrollView, s...
I have an iphone app, with a view (well multiple but let's say one at a time). The view is very simple just some text-fields and images on there. I have set the auto-resizing attributes for those controls so that they know that they need to be centered no matter what the orientation is. There is no code that moves them or anything, every...
I have a core data model which includes an entity with a to-many relationship. I have set the relationship to non-optional and set the 'min count' to one. However, I can't work out a way of acting on this rule once it has been breached. Ideally I'd just like the entity deleted... but I can't figure out a way to do this automatically, or ...
I have written a UITabBarController subclass (called MainViewController) and added a few instance variables, specifically a venue of type Venue. Each tab of the MainViewController needs to access the venue variable of the MainViewController. In the first tab, a UIViewController subclass named HomeViewController, I wrote my viewDidLoad me...
When I select a row in my outline view (connected to a NSTreeController) and click the remove button it doesn't delete the row that I have selected but actually deletes the row at the bottom of the table.
For some more information here is my Connections for the Button:
http://snapplr.com/t1hm
and the Entity model:
http://snapplr.com/k...
Hi All,
I am using UITextView to edit text. I want to use two buttons Edit and Save. Initially i want to show edit button, when the user click on edit i want to show save button. when the content successfully saved i dont want to show save button any more.
I am a c# coder, in c# i used to do like this
C# code
btnedit.visible=true;
...
I'm trying to create a method that takes several parameters using & (for address-of). What I'd like to do is have the method do some calculations and adjust the parameters so they can be used elsewhere.
I've defined the method as:
- (void) convertParameters: (double *)x: (double *)y: (double *)z: (double *)height: (double *)width: (do...
Unless I'm missing something, it seems arbitrary in which .h file I put the protocol definition. I'm even wondering if it could be in it's own .h file... (in Java, it's in its own file)
...
I have an array of dictionaries.
I want to filter the array based on a key.
I tried this:
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(SPORT == %@)", @"Football"];
NSArray *filteredArray = [data filteredArrayUsingPredicate:predicate];
This doesn't work, I get no results. I think I'm doing something wrong. I know th...
Just curious, what files are included when <Foundation/Foundation.h> or <Cocoa/Cocoa.h> is #imported? The framework and all the files in /usr/include?
...
i have a uitableviewcontroller
here is the .h file code
@interface addToFavourites : UITableViewController {
}
@end
and here is the .m file code
#import "addToFavourites.h"
@implementation addToFavourites
- (id)initWithStyle:(UITableViewStyle)style {
if (self = [super initWithStyle:style]) {
}
return self;
}
- (NSI...
Hi, I am new to mac developing, and kind of confused. I am trying to create a program with a toolbar, but can't seem to get it working. Can anyone explain me the steps needed to do this?
Beside, is there any control on the mac developing system similar to iPhones UITabBarController?
Thanks, Hans Espen
...
Hi all,
I'm trying to make use of OSX's input methods, specifically Cangjie and Pinyin, in an OSX application. Basically, what I want to do is to switch the input method to Cangjie upon entering a text field. The user can now use Cangjie to input Characters in Traditional Chinese. Upon leaving this text field, I want to use the other in...
Hello,
So I'm making a very basic Twitter app (it's actually Presence 2 from the Stanford iPhone course that's on iTunes), when I decided I wanted to see if my application was leaking. So I ran Leaks and it found one right off the bat. But when I look at the stack trace the leak appears to happen in the main function when I call UIAppli...
I'm having troubles finding a solution to being able to change my orientation in a view controller that isn't the root one. For example, in the utility project which has a root view controller, main view controller for the main view, and a flipside view controller for the flipside view, the only place I can control the orientation is fr...
I know it's possible for jailbroken iPhones but does Apple provide any API for skinning the main mobile desktop interface/background?
...
Hi there.
I just ported a .obj loader to objective-C and so far, it works, I can get my vertices and normals and stuff.
Every normal is good, pointing in the right direction, all my faces are in CCW winding, but I have some issues with the depth test.
float rotX = 0;
float rotY = 0;
objModel* o = [[objModel alloc] initWithPath:@"/model...
I'm looking for tools and approaches to determining what parts of of my Cocoa and Cocoa-Touch programs are most contributing the the final binary image size, and ways to help reduce it. I'm not looking for a "magic bullet" compiler flag. I'm looking for profiling techniques for evaluating and reducing image size waste in the same vein as...
I'm just starting out with iphone development and ran across some example code that used @"somestring"
someLabel.txt = @"string of text";
Why does the string need the '@'? I'm guessing it's some kind of shortcut for creating an object?
...
Hi!
I'd like to create database based models, so I wanna use my own DatabaseModel class to manage the database connection, and every class that uses database is derived from it (it would be a mapping between the model and the table). I'm using a sqlite API.
Since I need only one database connection instance, I created a static variable...