Search Results

Search found 40 results on 2 pages for 'rexonroids'.

Page 1/2 | 1 2  | Next Page >

  • How to tell when a UISwitch inside of a UITableViewCell has been tapped?

    - by RexOnRoids
    How to tell when a UISwitch inside of a UITableViewCell has been tapped? My UISwitch is set up inside of the cell (generic cell) like this: UISwitch *mySwitch = [[[UISwitch alloc] initWithFrame:CGRectZero] autorelease]; [cell addSubview:mySwitch]; cell.accessoryView = mySwitch; And I am trying to detect a tap like this (but its not working): - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath { NSUserDefaults *prefs; if(indexPath.section == 1){ switch(indexPath.row) { case 0: NSLog(@"Tapped Login Switch"); break; default: break; } } }

    Read the article

  • xcode linker error on iPhone app (Only on simulator)

    - by RexOnRoids
    Im getting this linker error that won't let me compile. It only happens on the simulator. KEY POINTS: - Happens only in simulator - Similar to THIS question, but found no FRAMEWORK_SEARCH_PATHS in my .pbxproj file - Though my OS is 10.6.2, I had to build target 1.5 to avoid other linker errors - libxml2.dylib IS required and is in my Frameworks group - The other cited libraries I have never heard of. - Tried bringing in those other Libs under frameworks, didn't solve. Build SpaceTweet of project SpaceTweet with configuration Debug Ld build/Debug-iphonesimulator/SpaceTweet.app/SpaceTweet normal i386 cd "/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)" setenv MACOSX_DEPLOYMENT_TARGET 10.5 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.3.sdk "-L/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/build/Debug-iphonesimulator" -L/Users/Scott/Desktop "-L/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/../../libYAJLIPhone-0" -L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib -L/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.3.sdk/usr/lib -L/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/usr/lib "-F/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/build/Debug-iphonesimulator" -filelist "/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/build/SpaceTweet.build/Debug-iphonesimulator/SpaceTweet.build/Objects-normal/i386/SpaceTweet.LinkFileList" -mmacosx-version-min=10.5 -framework Foundation -framework UIKit -framework CoreGraphics -framework AVFoundation -framework MessageUI -lYAJLIPhone -lxml2 -o "/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/build/Debug-iphonesimulator/SpaceTweet.app/SpaceTweet" ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libxml2.dylib, missing required architecture i386 in file ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libSystem.dylib, missing required architecture i386 in file ld: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libobjc.A.dylib, missing required architecture i386 in file collect2: ld returned 1 exit status Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1 CLUE: Again, MY question is very similar to THIS SOLVED QUESTION except that in my case I did NOT find a FRAMEWORK_SEARCH_PATHS entry in the .pbxproj file in my project bundle and thus could not solve in the manner in which that question was solved.

    Read the article

  • iPhone app linker error on Snow Leopard (Only on simulator)

    - by RexOnRoids
    Im getting this linker error that won't let me compile. It only happens on the simulator. NOTE: - OSX 10.6.2 but had to use 10.5 as build target to avoid other linker errors - libxml2.dylib IS required and is in my Frameworks group - The other cited libraries I have never heard of. - Tried bringing in those other Libs under frameworks, didn't solve. Build SpaceTweet of project SpaceTweet with configuration Debug Ld build/Debug-iphonesimulator/SpaceTweet.app/SpaceTweet normal i386 cd "/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)" setenv MACOSX_DEPLOYMENT_TARGET 10.5 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.3.sdk "-L/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/build/Debug-iphonesimulator" -L/Users/Scott/Desktop "-L/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/../../libYAJLIPhone-0" -L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib -L/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.3.sdk/usr/lib -L/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/usr/lib "-F/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/build/Debug-iphonesimulator" -filelist "/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/build/SpaceTweet.build/Debug-iphonesimulator/SpaceTweet.build/Objects-normal/i386/SpaceTweet.LinkFileList" -mmacosx-version-min=10.5 -framework Foundation -framework UIKit -framework CoreGraphics -framework AVFoundation -framework MessageUI -lYAJLIPhone -lxml2 -o "/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/build/Debug-iphonesimulator/SpaceTweet.app/SpaceTweet" ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libxml2.dylib, missing required architecture i386 in file ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libSystem.dylib, missing required architecture i386 in file ld: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libobjc.A.dylib, missing required architecture i386 in file collect2: ld returned 1 exit status Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

    Read the article

  • how to programatically set the current page for UIPageControl?

    - by RexOnRoids
    I have 3 "pages" (page 0, page 1, page 2) in a UIScrollView that are snapped to by finger swipes. There is a UIPageControl there too. The UIScrollView starts off presenting page 0. What I want to do is present page 3 FIRST sometimes. How can I do this programatically. Simply setting currentPage (of UIPageControl) to the page number does nothing by the way.

    Read the article

  • sudo port install cmake trouble (for MGTwitterEngine)

    - by RexOnRoids
    I am following This Tutorial on installing MGTwitterEngine on my MAC osx 10.6.2. I am stuck on this step: sudo port install cmake it gives me the following error: dlopen(/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib, 10): no suitable image found. Did find: /opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib: no matching architecture in universal wrapper while executing "load /opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib" ("package ifneeded Pextlib 1.0" script) invoked from within "package require Pextlib 1.0" (file "/opt/local/bin/port" line 40) Rex-MacBook-Pro:~ Rex$ Thus, I cannot use TERMINAL to install YAJL to get my app to build. Help needed. P.S. In terminal preferences, Shells Open With is either /usr/bin/login or /bin/bash YAJL is supposedly installed at /Users/Rex I am using OSX 10.6.2

    Read the article

  • what is the proper way to set a UIImageView with a UIImage?

    - by RexOnRoids
    I have a UIImageView that starts off with an image (loading.png) specified in IB. When my app starts, a new image is downloaded from the internet to replace the existing one. I do the following to replace the image: if(object.imageView.image != nil){ [object.imageView.image release]; object.imageView.image = nil; } object.imageView.image = [UIImage imageNamed:@"downloadedimage.png"]; Is this the right way to re-set an image? I am getting EXC_BAD_ACCESS when doing so.

    Read the article

  • Why does this only work sometimes? (UITextView resign first responder question)

    - by RexOnRoids
    When a user presses the "SEND"(return) button I want the keyboard to retract and do other stuff like send a message. But it only works SOMETIMES... Why does this code only work SOMETIMES? I need it to work all the time obviously, but it doesn't. - (void)textViewDidChange:(UITextView *)inTextView { NSString *text = myTextView.text; if ([text length] > 0 && [text characterAtIndex:[text length] -1] == '\n') { myTextView.text = [text substringToIndex:[text length] -1]; [myTextView resignFirstResponder]; [self sendMessage]; } }

    Read the article

  • How to stop OpenGL from applying blending to certain content? (cocos2d/iPhone/OpenGL)

    - by RexOnRoids
    Supporting Info: I use cocos2d to draw a sprite (graph background) on the screen (z:-1). I then use cocos2d to draw lines/points (z:0) on top of the background -- and make some calls to OpenGL blending functions before the drawing to SMOOTH out the lines. Problem: The problem is that: aside from producing smooth lines/points, calling these OpenGL blending functions seems to degrade the underlying sprite (graph background). So there is a tradeoff: I can either have (Case 1) a nice background and choppy lines/points, or I can have (Case 2) nice smooth lines/points and a degraded background. But obviously I need both. The Code: I have included code of the draw() method of the CCLayer for both cases explained above. As you can see, the code producing the difference between Case 1 and Case 2 seems to be 1 or 2 lines involving OpenGL Blending. Case 1 -- MainScene.h (CCLayer): -(void)draw{ int lastPointX = 0; int lastPointY = 0; GLfloat colorMAX = 255.0f; GLfloat valR; GLfloat valG; GLfloat valB; if([self.myGraphManager ready]){ valR = (255.0f/colorMAX)*1.0f; valG = (255.0f/colorMAX)*1.0f; valB = (255.0f/colorMAX)*1.0f; NSEnumerator *enumerator = [[self.myGraphManager.currentCanvas graphPoints] objectEnumerator]; GraphPoint* object; while ((object = [enumerator nextObject])) { if(object.filled){ /*Commenting out the following two lines induces a problem of making it impossible to have smooth lines/points, but has merit in that it does not degrade the background sprite.*/ //glEnable (GL_BLEND); //glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glHint (GL_LINE_SMOOTH_HINT, GL_DONT_CARE); glEnable (GL_LINE_SMOOTH); glLineWidth(1.5f); glColor4f(valR, valG, valB, 1.0); ccDrawLine(ccp(lastPointX, lastPointY), ccp(object.position.x, object.position.y)); lastPointX = object.position.x; lastPointY = object.position.y; glPointSize(3.0f); glEnable(GL_POINT_SMOOTH); glHint(GL_POINT_SMOOTH_HINT, GL_NICEST); ccDrawPoint(ccp(lastPointX, lastPointY)); } } } } Case 2 -- MainScene.h (CCLayer): -(void)draw{ int lastPointX = 0; int lastPointY = 0; GLfloat colorMAX = 255.0f; GLfloat valR; GLfloat valG; GLfloat valB; if([self.myGraphManager ready]){ valR = (255.0f/colorMAX)*1.0f; valG = (255.0f/colorMAX)*1.0f; valB = (255.0f/colorMAX)*1.0f; NSEnumerator *enumerator = [[self.myGraphManager.currentCanvas graphPoints] objectEnumerator]; GraphPoint* object; while ((object = [enumerator nextObject])) { if(object.filled){ /*Enabling the following two lines gives nice smooth lines/points, but has a problem in that it degrades the background sprite.*/ glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glHint (GL_LINE_SMOOTH_HINT, GL_DONT_CARE); glEnable (GL_LINE_SMOOTH); glLineWidth(1.5f); glColor4f(valR, valG, valB, 1.0); ccDrawLine(ccp(lastPointX, lastPointY), ccp(object.position.x, object.position.y)); lastPointX = object.position.x; lastPointY = object.position.y; glPointSize(3.0f); glEnable(GL_POINT_SMOOTH); glHint(GL_POINT_SMOOTH_HINT, GL_NICEST); ccDrawPoint(ccp(lastPointX, lastPointY)); } } } }

    Read the article

  • How to determine the size (in bytes) of a file downloading using NSURLConnection?

    - by RexOnRoids
    I need to know the size of the file I am downloading (in bytes) into my app using NSURLConnection (GET). Here is my bytes recieved code below if it helps. What I need to know is how to get the filesize in bytes so that I can use it to show a UIProgressView. - (void)connection:(NSURLConnection *)theConnection didReceiveData:(NSData *)data // A delegate method called by the NSURLConnection as data arrives. We just // write the data to the file. { #pragma unused(theConnection) NSInteger dataLength; const uint8_t * dataBytes; NSInteger bytesWritten; NSInteger bytesWrittenSoFar; assert(theConnection == self.connection); dataLength = [data length]; dataBytes = [data bytes]; bytesWrittenSoFar = 0; do { bytesWritten = [self.fileStream write:&dataBytes[bytesWrittenSoFar] maxLength:dataLength - bytesWrittenSoFar]; assert(bytesWritten != 0); if (bytesWritten == -1) { [self _stopReceiveWithStatus:@"File write error"]; break; } else { bytesWrittenSoFar += bytesWritten; } while (bytesWrittenSoFar != dataLength); }

    Read the article

  • How do I force one method to be executed before another method?

    - by RexOnRoids
    I've got 2 methods. One method starts playing an audio file (.mp3), the other method updates a UIToolBar to show a button (PLAY or PAUSE). These two methods are called in the following order: //Adds some UIBarButtonItems to a UIToolBar [self togglePlayer]; //Uses AVAudioPlayer [audioPlayer play]; I call the methods in the above order so that the (pause) button will be shown at the time the song starts playing. But, the problem is that the song starts playing first, and the UIToolBar remains unchanged for quite a while (from 2 to 5 secs) until the button is added and shown. What I want is for the button to be shown at the same time the song starts playing (i.e. NO DELAY). Is there any way to do this?

    Read the article

  • Can a ViewController (AdMob AdViewController) control a view that is a subview of the controlled vie

    - by RexOnRoids
    I am trying to use the IB AdMob ad in my app. I followed the instructions provided but I am getting an EXC_BAD_ACCESS from the AdMob class. I am trying to figure out what the problem is. Anyway, my question is Can a ViewController (AdMob AdViewController) control a view that is a subview of the controlled view of another UIViewController? Here is how I set it up: I start off with a UIViewController in IB. Step 1) I add a UIView sized 320 x 48 to the UIView controlled by the UIViewController. Step 2) I add an Object to the hierarchy (not under any other object). Step 3) I set the class of the Object to AdViewController (AdViewController.h of AdMob SDK) Step 4) I set connect the view outlet of the Object to the UIView of Step 1

    Read the article

  • How to identify WHICH NSURLConnection did finish loading when there are multiple ones?

    - by RexOnRoids
    Multiple NSURLConnections being started (in a single UIViewController) to gather different kinds of data. When they return (-connectionDidFinishLoading) I wanna do stuff with the data, depending on the type of data that has arrived. But one prob, HOW DO I KNOW WHICH NSURLConnection returned? I need to know so I can take action specific to the type of data that came. (Eg. display a twitter update if it was the twitter xml data)(Eg. display an image if it was a photo) How do people usually solve this?

    Read the article

  • Pesky compiler error on iPhone app

    - by RexOnRoids
    Trying to get MGTwitterEngine app to build. Getting one pesky error. The following ERROR. ld warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libxml2.dylib, missing required architecture i386 in file ld warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libobjc.A.dylib, missing required architecture i386 in file ld warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libSystem.dylib, missing required architecture i386 in file ld: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libobjc.A.dylib, missing required architecture i386 in file collect2: ld returned 1 exit status

    Read the article

  • How to Unload a popped view controller?

    - by RexOnRoids
    Using a navigation based view hierarchy. I have a root view controller, and multiple view controllers that branch out from the same when a button is pressed. When a user presses the back button on the UINavigationBar, the current viewcontroller is popped and the display animates back to the rootviewcontroller. The problem is, I want the viewcontrollers to UNLOAD whenever they are popped. Seems like they are not unloading because when I go back to them they are still in the state they were when they were popped. How do I unload the viewcontrollers after navigating back to the rootviewcontroller?

    Read the article

  • Can I load multiple UIViewControllers that each kick off their own NSURLConnections?

    - by RexOnRoids
    My Rootviewcontroller uses NSURLConnection to get data from a server, and then, based on this data, loads a bunch (like 7) of smaller UIViewControllers that each also use their own NSURLConnection to get some more specific data from the server. But, the problem is, only the RooTViewController is recieving callbacks from: - (void)connectionDidFinishLoading:(NSURLConnection *)theConnection the other UIViewControllers never get callbacks...

    Read the article

1 2  | Next Page >