I'm working on a project that needs to have a list of weekdays.
I could get their locale names using the NSDateFormatter without a problem, but I was hoping to have an integer weekday also to save on the database and do some work.
Where can i get that number?
Thanks,
Leonardo
...
Hi, i'm have this code for initialize my class.
- (id)initWithSize:(int)size {
self = [super init];
if( self != nil )
{
[self setMyVector:[[NSMutableArray alloc] initWithCapacity:size]];
for ( int i = 0; i < size; i++ )
{
[myVector addObject: [[NSMutableArray alloc] initWithCapacity:size]];
}
...
I am custom drawing text into a custom UITableViewCell, but am struggling in working out how to draw a line to underline text.
I am currently trying to do the following:
CGContextMoveToPoint(context, pt.x, pt.y+sz.height);
CGContextAddLineToPoint(context, pt.x+sz.width, pt.y+sz.height);
but although the code gets called, nothing is a...
@protocol Eating
@end
@interface Eat : NSObject<Eating>
{
}
- (id<Eating> *)me;
@end
@implementation Eat
- (id<Eating> *)me { return self; }
@end
In the above piece of Objective-C code, why does "return self" result in a "Return from incompatible pointer type" warning? What's the incompatible pointer type and how to fix it?
...
Howdy,
I have a UITableView where in some instances, certain sections have zero rows. My goal is that when this is true, I don't want any wasted space in the table view, it should look like there's no data.
The problem I'm having is with the header and footer for the sections, which are showing even if there's no row and despite me ove...
Hello wonderful people !
Here is my problem. I have a chipmunk's rigid body (a soda can standing up) that i want to change its center of gravity to the bottom of the object so it can fall on its flank when a force is applied to its upper part.
Am I on the right track?
1) For some reason, I am having trouble setting the body's center ...
Hello everyone. My app is consisted of 2 views. The MainView and ResultsView. MainView contains a UITextField that needs to be filled and then if a button is touched, the view changes to ResultsView. Below is the juicy part of the code that handles that.
// In CallerIDAppDelegate.h
@class MainViewController;
@class ResultsViewController...
Hi,
Anyone know what the best practices are for drawing multiple layers of 2D OpenGL ES content on the iPhone?
For example, let's say I want to draw a complex fullscreen background texture, followed by a rotating texture, followed by another alpha blended texture on top.
Is there a way to draw the background texture only ONCE, and onl...
I've a UITableView and I populate data from a service. When the number of rows is higher than what could be displayed on the screen, I'm able to scroll the table. But when it's less (say 1 or 2), I'm unable to scroll (in the sense, the bouce effect doesn't work making the UI appear odd).
I think this should be fixed by some IB checkbox,...
I have a new iPhone app that has the following (and only the following) UIView heirarchy:
UIWindow -> UIScrollView -> UIViewSubclass
The UIScrollView is the view of a UIViewController. In UIViewSubclass I want to be tracking and responding to touch events and have set up the "standard four" handling routines therein. Under the Simulat...
Hi Guyz,
I'm having a hard time figuring out how to access a group of UIButton created in Interface Builder.
I created a single IBOutlet and point that outlet in each of UIButton in the XIB. Now my problem is how can I change the properties of this UIButtons such as changing its title when everytime I click a single another UIButton?
...
Hello All:
I have an application on AppStore. On releasing a new version on appstore, I want that user should be asked to remove the old version and then install the new version when he tries to install new version on an existing version of the application.
Can anybody tell me how to do this.
Thanks in advance
Ashwani
...
I have a View Controller, and a UIImageView as a subview. That UIImageView also has a subview of that same type.
I have:
self.userInteractionEnabled = YES;
set for each. My touchesEnded code was working. Any idea what would cause this? No touches are even reaching the touches events. I don't understand?
Any help appreciated.
Thanks...
I'm trying to disable scrolling for a UIWebView and the only way i found is using this way:
#import <objc/runtime.h>
id scroller = [[Webview subviews] lastObject];
int count;
Method *method = class_copyMethodList([scroller class], &count);
int i;
for (i=0; i<count; i++) {
if (strcmp(method_getName(method[i]), "setScrollingEnabled:"...
I was wondering if there is a difference between using .xib files for GUI design and doing this programmatically.
As it is a compiler I would assume that there is no relevant time lost.
Am I wrong?
...
I have a WML based source of data which I need to parse in an iPhone app.
What would be the easiest way to achieve this?
I'm currently looking into the various XML libraries available on the iPhone but would appreciate a nudge in the right direction.
Currently playing around with ElementParser, it seems that WML isn't close enough to ...
I've upgraded to Snow Leopard and Xcode 3.2 but now I don't get the usual Developer Documentation any more. When I click on 'Developer Documentation' all I get is the Xcode QuickStart guide. No search field, no browsing the library, nothing. Only if I cmd+opt+shift (?) double click on e.g. NSString the API documentation of NSString comes...
The UI of my iPhone application has lots of static labels, and I have set accessibility hints for them in Interface Builder. I want to access these programmatically so I can provide help bubbles - a custom subclass of UILabel recognises a touch and displays a bubble with the value of [self accessibilityHint].
However, [self accessibilit...
When i test my iPhone application on simulator there is no problem. But when i try to test it on iPhone device via xcode, connection:didFailWithError is triggered and the localized description of the error is 'timed out'. What can be the reason for the time out on device?
...
i want to make a list of all audio or video file stored in iPhone with the help of my application. I know the mp3 is stored at "var/mobile/media/iTune_control/music" this path. But when i run my application using this path, it show there is no file at this path. I think the certain path is write protected. Is there is any way to find the...