Hi,
how can I calculate the calendar week? A year has 52/53 weeks and there are two rules:
-USA
-DIN 1355 / ISO 8601
I'd like to work with DIN 1355 / ISO 8601. How can I manage that?
Edit:
NSDate *today = [NSDate date];
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"ww"];
NSString *weeknum...
I want to close other application running background with my app
how can i do it?
...
Hi, please go through the following code and please explain why is it crashes in last line?
NSMutableDictionary *dic1 = [[NSMutableDictionary alloc] initWithCapacity:10];
NSString *val = [[NSString alloc] initWithFormat:@"Deepak"];
NSString *key = [[NSString alloc] initWithFormat:@"First Name"];
int a = [val retainCount];
a = [key ...
Hello I have a bizarre problem with sprintf. Here's my code:
void draw_number(int number,int height,int xpos,int ypos){
char string_buffer[5]; //5000 is the maximum score, hence 4 characters plus null character equals 5
printf("Number - %i\n",number);
sprintf(string_buffer,"%i",number); //Get string
printf("String - %s\n...
Hi, i have a situation like this:
NSMutableArray * A = [[NSMutableArray alloc]initwithObjects:@"one",nil];
NSMutableArray * B = [[NSMutableArray alloc]initwithObjects:@"two",nil];
[A addObject:B];
[B addObject:A];
now here is a retain cycle, How can i break this retain cycle? (using weak reference)....in above example.
Thanks
...
Hi
I have no ieda how to refresh the images in a flowcover http://www.chaosinmotion.com/flowcover.m
I have tried [view reloadData]; but haven't been successful. Can anyone tell me what I should do please?
...
How to integrate BING Map into iPhone Application?
I am doing using VirtualEarthKit framework (http://consonancesw.com/blog/?p=64).
My code is as below :
I am getting error while getting token.
{
VECommonService *commonService = [[VECommonService alloc] init];
NSString *token;
printf("2\n");
NSError *error=[commonService getToken:&t...
Hey, right now I have implemented my own listener pattern.
I will send an update to the listeners using fast enumeration.
the code will look like this
- (void) updateListeners {
for (id<AProtocol>listener in _listeners)
{
[listener update];
}
and in listener, i implement method for AProtocol, which is update.
suppose there are n ob...
I have a view in my app where I use a very large photo that is Hi-Res and takes a bit of time to load. How do I put a loading screen while this is happening? The kind of loading screen with the spinning loading wheel so that the app does not look like it has frozen? Thanks in advance for any help!
Edit: Note that I am simply loading the...
Hi everyone,
I am tyring to customize the colors a bit in a ABPeoplePickerNavigationController below is my complete code:
ABPeoplePickerNavigationController *objPeoplePicker = [[ABPeoplePickerNavigationController alloc] init];
[objPeoplePicker setPeoplePickerDelegate:self];
objPeoplePicker.topViewController.navigationController.navigat...
Im writing a project in Objective-C but I'm relying quite much on plain old C since there's OpenGL involved.
I have a data blob that I read to memory from a file in the following way:
NSString *path = [[NSBundle mainBundle] pathForResource:@"iPadTest" ofType:@""];
NSFileHandle *file = [NSFileHandle fileHandleForReadingAtPath:path];
dat...
I have built a new view with an activity indicator attached, loading this nib, seems to be working fine on another view:
- (void)viewDidLoad {
[super viewDidLoad];
ProgressViewController *progresssView = [[ProgressViewController alloc] initWithNibName:@"ProgressViewController" bundle:nil];
[self.view addSubview:progresssVie...
Hi all,
I am new to iPhone developement.
Here is my question.
I would like to do a 'device texting capability' check on my iPhone simulator before I deploy it to my phone. This is the code I wrote in the .m file.
This is the function which is called when my SMS button is triggered.
Class messageClass = (NSClassFromString(@"MFMessa...
Hi,
Can anybody tell me excatly how I should execute this method on an NSURL object?
URLByResolvingSymlinksInPath
Compiler says that the method can't be found when I execute it.
Thanks a lot.
This is where I am trying to implement the code:
- (void)data
{
NSURL *url = [[NSURL alloc] initWithString: [[user data] objectAtIndex: 5...
On click event of a button
[mybutton addTarget:self action:@selector(captureView)
forControlEvents:UIControlEventTouchUpInside];
- (void)captureView {
UIGraphicsBeginImageContext(CGSizeMake(320,480));
CGContextRef context = UIGraphicsGetCurrentContext();
[self.view.layer renderInContext:context];
UIImage *screenS...
I have a view controller:
@interface DetailViewController : UIViewController
It displays a map and pins are dropped onto this map. When the user tap's the accessory button one of the annotation views I want another view to be pushed in front of the user.
For some or other reason the navigation controller is always null when I run ...
The Problem
I have an NSOperationQueue called logEntryGeneratorQueue
I want to wait until all operations on the queue have completed
If I use:
[logEntryGeneratorQueue waitUntilAllOperationsAreFinished];
it works fine if the thread adding to the queue is in the background itself.
However, if I'm running this code via a unit test,...
I am a bit of a iPhone/Mac OS newb.
When I look at a backtrace in the debugger and UIKit or other Apple Libraries are on the call stack I can't see their function arguments because of missing debug symbols.
Does Apple Ship debugging symbols for the iPhone Simulator libraries like UIKit?
Thanks.
...
How can I access (to change the imageView.image) the next cell of my UITableView given that I already have:
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
...
I have a tab bar application and I want to display those views that most part of apps have, with the name of the company or the name of the app.
I've created the follow viewController
Introduction *introducao = [[Introduction alloc] initWithNibName:@"Introduction" bundle:nil];
I don't know where exactly should I insert the code to s...