I'm looking at IKImageDemo supplied by Apple, the rotate round-slider is linked to a setRotation: method in the FirstResponder. However, none of the objects in the project seem to HAVE such a method, and yet the code works.
I'm trying copy this into my own project, and MY FirstResponder doesn't have a setRotation: method, so I'm not sur...
I'm trying to get one instance of using NSNotificationCenter with addObserver and postNotificationName but I can't work out why it won't work.
I have 2 lines to code to add the observer and send the message in 2 different classes
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(newEventLoaded:) name:@"Event" obj...
Hey there!
I tried to fetch the router address this way.
- (NSString *) routerIp {
NSString *address = @"error";
struct ifaddrs *interfaces = NULL;
struct ifaddrs *temp_addr = NULL;
int success = 0;
// retrieve the current interfaces - returns 0 on success
success = getifaddrs(&interfaces);
if (success == 0)
{
// ...
Hey folks!
In my project there is a managed object called "Group".
This object itself can contain child group objects.
How do I solve this situation in CoreData and in the FetchedResultsController?
My first shot:
http://i46.tinypic.com/zvonpd.png
Thanks, Dan
...
I'm pretty much through "programming in Objective C" and I am working through the stanford class as well, but I'm really am having a hard time understanding how to deal with views (especially how it relates to drawing, paths, subviews, pretty much all of it actually(I understand the concepts but the implementation is where i get confused...
In order to better understand the startup, event queue, and methods within my application I'm trying to write a program that does two things: Play a beep at the startup and every time the user hits a button. So far it only plays when the user hits the button. I know there may be multiple ways to get the startup beep to play, but in ord...
I'm trying to create a modal status indicator display for an iPhone app, and would like one similar to this one used in Tweetie:
Specifically, this one "shades out" the entire screen, including the toolbar. I don't believe through any normal UIView manipulation, I can extend past the bounds of my window, can I? I believe I've seen a s...
The app is downloading a file (plist) which is generated by the server. The server takes a loooong time to generate the file, so I would like to be able to show progress (probably view UIProgressView, but that's not important).
Since the file I'm downloading hasn't been created yet at the beginning of the request, we don't know the expe...
So Objective-C has these nice functions NSClassFromString() and NSProtocolFromString(), which return a class or protocol from a passed string name. Is there any way to do this with an object?
...
Hi..
I have an app that ask for user's Location. Then user's location will be send to a server. Since the app that was run on first time on a iPhone will ask for permission, if a user rejects it, the app will keep on asking it on next time until it was allowed (AFAIK); but if the user allows the app to use the location twice, the app wi...
I have a custom subclass of UIView that needs to perform a selector when a value (NSInteger) falls below a certain value. From what I can tell from the docs, I need to set up an observer object to look for this change.
The NSInteger value exists in the view controller and the UIView subclass is implemented as a subview in the same view...
I just noticed this in some code that's been working for months. Though it makes me curious I'm sure we've been living on borrowed time...
Assuming activeItem:
@property (nonatomic, retain) ItemView *activeItem;
And we have this conditional in touchesEnded:
if (CGRectContainsPoint(dropRect, touchLocation)) {
ItemView *replacemen...
I want to implement this function on my apps but i cant seem to figure out how to use this line of codes.
- (void)applicationWillResignActive:(UIApplication *)application {
//our app is going to loose focus since there is an incoming call
[self pauseGame];
}
- (void)applicationDidBecomeActive:(UIApplication *)application{
//the user...
Here is what I'm trying to accomplish: I'm working on an open source TI calculator emulator where I'm currently trying to add skin support. The skin image is just an NSImageView with its image set to the skin image. I override the mouseDown: method and get the location of the mouse in the NSImageView coordinates using convertPointFromBas...
I am interested in searching a string (using objective-c) starting from a specific character in the middle of the string. I could split the string, but is there another way? I don't see an obvious option for that in the definition of NSString. I want to be able to search either backwards or forwards in the string starting from a define...
What is the best way to calculate the distance between two points/Or we can say while we walk calculate distance traveled using accelerometer? My main question is that i'm working on an application in which i need to count distance using two locations but sometimes the core locations fails to update location so at that time how do i calc...
hi
I want to use in app purchase application in my application but i have no more knowledge how to do this.
any body help me how to do and where is source code is available. give me link or code.
...
Hi friends,
I have mainString from which i need to get the part of the string after finding a keyword.
NSString *mainString = "Hi how are you GET=dsjghdsghghdsjkghdjkhsg";
now I need to get the string after the keyword "GET=".
Waiting for a reply.
...
I'm trying to get the contents of a CSV file into an array. When I've done this before I had one record per line, and used the newline character with scanUpToCharactersFromSet:intoString:, passing newlineCharacterSet as the character set:
while ([lineScanner scanUpToCharactersFromSet:[NSCharacterSet newlineCharacterSet]
...
Hi all,
i'm new to iphone programming and i encountered/noticed some problems while i was coding. which was after i typed a statement like
if (label.text > label2.text) {
do something...}
however, after typing my application can be compiled and run however when i try to validate it by comparing the values, my specified actions ...