Hi Everyone
this is what i want to achieve
1) Have a page control that allows user to do a swipe to 6 different pages
2) each page is a table view controller
3) everything is done via code NOT IB
The tutorials that are i find either use VIEW CONTROLLER or is done via IB. I am not very good with IB and prefer to have everything done vi...
In the Twitter for iPhone application (the app formerly known as Tweetie) there is nifty effect when pushing from the tweet view controller to the account view controller.
The name of the account, the profile image and the users name stay fixed in position while the navigation controller animates pushing a new controller on to the stac...
In cocoa-touch development...
Use AppDelegate for delegate classes
Create separate delegate class and locate in new .h/.m for each class need to use delegate
Use view controller classes(whenever such exist) to do that job for all
classes managed by this controller
What would you recommend?
...
I have created my own leftBarButtonItem:
UIBarButtonItem* homeButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemBookmarks
target:self
a...
There is a simple application written in C, which includes only standard C library functions (from stdio, stdlib, etc.) and Makefile+GCC to build it. Now, I wanna port it to iPhone OS for iPhone/iPads. Will it be seamless or are there any possible incompatibility issues?
...
I am trying to write the following without using dot notation ...
[scrollView setMinimumZoomScale: scrollView.bounds.size.width / image.size.width];
Is this right?
[scrollView setMinimumZoomScale: [scrollView bounds].size.width / [image size].width];
cheers Gary.
...
Hello all -
I am learning Obj-C but still occasionally have a difficult time wrapping my head around some of the mem management stuff. I am using custom cells with a UITableView, and implemented the cellForRowAtIndexPath method where I accidentally released the cell at the end. This obviously caused problems as the cell was also gettin...
I have a daemon that is running as user nobody.
It needs to copy a file that I specify into /Users/Shared/MyFolder
If I tell it to copy a file that is already in /Users/Shared/ it works fine.
If I tell it to copy it from somewhere in my home directory like the desktop, the copy fails.
I'm using NSFileManager copyPath:toPath:
Any ideas?
...
I have a UILabel for each cell at cellForRowAtIndexPath.
UILabel *cellLabel = [[UILabel alloc] initWithFrame:frame];
cellLabel.text = myString;
I want to access that string "myString" at didSelectRowAtIndexPath using indexpath.
NSString *anotherString = cell.textLabel.text;
returns null.
Now if at cellForRowAtIndexPath, I did some...
In the following code I have a view object that is an instance of UIScrollView, if I run the code below I get warnings saying that "UIView might not respond to -setContentSize etc."
UIImage *image = [UIImage imageNamed:@"Snowy_UK.jpg"];
imageView = [[UIImageView alloc] initWithImage:image];
[[self view] addSubview:imageView];
[[self vie...
I've been using http://code.google.com/p/plblocks/ for a while now to get blocks support in our 3.2 iPad app. It was recently pointed out to me that you can set xcode to use the 4.0 SDK, then set the OS Deployment target to 3.2.
If I do, the following code works.
void (^world)() = ^ {
NSLog(@"Hello World");
};
NSLog(@"Hello?");
...
Just started exploring Cocoa so pretty much a total noob.
I've written a very simple game. Set it up in Interface Builder and got it working fine.
It contains a number of buttons and I'm now trying to get the buttons to display images.
To start with I'm trying to get an image displayed on just one of the buttons which is called tile0 ...
This seems so basic but for some reason I can't get it to work - the 2 variables are both defined as NSIntegers:
if ([AScore == "100"] && [BScore == "100"]) {
...
}
That doesn't work - nor does it work when I take away the parentheses - nor does it work if I try to implement the 'isEqualToString' command. I'm sure this is a ve...
Here's the issue – I followed along with the Apple lazy-load image sample code to handle my graphical tables. It works great. However, my lazy-load image tables are being stacked within a navigation controller so that you can move in and out of menus. While all this works, I'm getting a persistent crash when I move into a table then move...
Hello,
I've using the Objective-C singleton from here at stackoverflow.
The singleton in the class method accesses it's instance variable, which works, but throws a complie warning. How should I be doing this? Is there a way to do this without accessing the sharedInstance: in each class method?
for example here is my class method:
+...
I am trying to store a username and password to hash against for future offline logging in. What is the best way to do this in objective c?
I will need the password to be stored securely.
...
hi, i got a problem with my time interval. I need to get the interval of two times in this format : HH:MM. If i enter : 15:35 and 16:35 it is ok, but when i do 20:30 to 01:30, it gives me like 18 hours interval.. anyone have an idea?
NSString *startDate= starthere.text;
NSString *endDate = endhere.text;
NSDateFormatter...
In carbon/cocoa, is it possible to send something like performKeyEquivalent to the current key window? I want to send a key event to whatever application the user has active.
Thanks!
...
I'm trying to make a feature in a product which gives the user the ability to split a textview into two. The way this is done is by removing the textview from it's superview, making a NSSplitView and adding the textview as well as a new NSTextView instance to this splitview. Lastly I make these two textviews share the same textstorage in...
// in ClassA.h
static NSString *globalStr = @"HelloWorld";
@interface ClassA
...
@end
// in ClassB.h
#include "ClassA.h"
// in ClassB.m
...
NSLog(@"The global string: %@", globalStr);
...
In C++, "static" should mean the variable or function has a internal linkage.
But it is used to share the variable in this case, e...