Skip to main content

Posts

Showing posts with the label xcode

Calendar synch?

I am looking to synchronize a google calendar into my in app calendar but I don't have any idea of how to do this. The idea is that the synchronized calendar could be seen by any user that has this app. Thanks

Guard Malloc doesn"t work

I'm experimenting with different profiling options that Xcode provides, but when I enabling Guard Malloc option in Diagnostics tab and trying to run, I'm getting this error with immediate crash: dyld: could not load inserted library: /usr/lib/libgmalloc.dylib And it is right, /usr/lib/ doesn't contain this library. I've located it in: Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib/ So I've created link, and started Command Line Tool (just to be sure, because it apparently part of MacOS SDK), enabled Guard Malloc again but the problem remains. I don't quite get where is a problem: does it new Xcode 4.3 inadvertence, problem with my system or planned decision by Apple to replace it with something else (maybe Instruments )?

uitableView reloadData doesn"t work after setting delegate, datasource and file"s owner connection

I have googled and done lot of research from my side to find out why the reloadData method on tableview wouldn't work. I checked all the possible solutions like the datasource is set, delegate is set, the tableview is connected to the file's owner. After all these, when I am trying to reload the tableview, the no. of rows method gets called, but the cell for rowAtIndexPath doesn't get called. Below is the code that I have written. Please let me know, where I am going wrong - (void)onReservationListSuccess:(NSArray *)rData { if ( rData != nil ) { resList = [[NSArray alloc] initWithArray:rData]; if([resList count] > 0) { [self.tripsTableView reloadData]; //[self.tripsTableView beginUpdates]; //[self.tripsTableView reloadSections:[NSIndexSet indexSetWithIndex:0] // withRowAnimation:UITableViewRowAnimationNone]; //[self.tripsTableView endUpdates]; } else { [tripsTableView reloadData];

Blurry images when running my application on iPhone

So, I was creating an application for iOS with Xcode 4.2.1, I don't know why all of my icons are blurry, they are in high definition, but for some reason they looks blurry and in a bad quality. even the background images looks bad.. Please help me, what can I do about it? This is the original button image: This is how it looks on the application:

When using GPX in Xcode to simulate location changes, is there a way to control the speed?

I'm using the following GPX file in Xcode 4.2 to simulate a location change. It works well, but I can't control the speed of the location change. stamp seems to be not working. Does anyone have a solution for this? <?xml version="1.0"?> <gpx version="1.1" creator="Xcode"> <wpt lat="37.331705" lon="-122.030237"></wpt> <wpt lat="37.331705" lon="-122.030337"></wpt> <wpt lat="37.331705" lon="-122.030437"></wpt> <wpt lat="37.331705" lon="-122.030537"></wpt> </gpx>

How to push DetailView without NavigationController on UIViewController

I have a ViewBased App. I added a UITableView on one of the UIViewControllers. It shows the data and I implemented all the delegate methods etc. My problem is when I want to show the detailView it just doesn't happen. My code: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { DetailViewController *detailViewController =[[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:nil]; NSLog(@"DidSelectRowAtIndexPath"); // Pass the selected object to the new view controller. [self.navigationController pushViewController:detailViewController animated:YES]; [detailViewController release]; } I see that I need a navigationController but I don't have one and I was unsucessful trying to add one programatically. I don't have one in my appDelegate either, so my question is do I need to add one to show the detail view? If yes, please give me a code sample

How to put a UITableView below a UILabel with code

I wrote a code with a UILabel with the name of a meteorological station. Later, I added the code to put a UITableView with a grid view like this website explains http://www.recursiveawesome.com/blog/2011/04/06/creating-a-grid-view-in-ios/ The problem is that now the Table view is shown in all screen and the label can't be seen. How do I make to put the elements in this order? UILabel UITableView Thanks!

Error Domain=NSPOSIXErrorDomain Code=61 "The operation couldn\u2019t be completed. Connection refused&rdquo;

I am using asyncSocket as client side, aim running my application on I-Phone simulator, and the server side coded with C#. its working perfectly if i try to connect with a server on my LAN but the connection refused with the server out of my LAN. I'am sure that the same server is working with another client code done on C#. And this the message i get from socket Error: Error Domain=NSPOSIXErrorDomain Code=61 "The operation couldn\u2019t be completed. Connection refused" Knowing that i get this message on connect phase before try to send data to server. Any helping idea is appreciated.

iOS Creating a list of tags

I'm currently trying to implement a feature in my app that shows tags for a post. I want it to work very similar to that of tags here on StackOverflow, in that they have a colored background. Another example, are the Inline Labels here . I'm just not quite sure on how to get it implemented. My first guess would to create an array of UILabels... Any suggestions?

Unrecognized selector sent to instance?

I have seen that a few others have had this problem as well. I'm trying to follow a tutorial online that shows how to create animated pins on a MapView. I have implemented the code as shown in the tutorial and the project builds fine except I receive this exception: -[MKPointAnnotation iconN]: unrecognized selector sent to instance I have a subclass of 'MKPinAnnotationView' and in the .m file I create this method: - (void)setAnnotation:(id<MKAnnotation>)annotation { [super setAnnotation:annotation]; //Place *place = [[Place alloc] init]; Place *place = (Place *)annotation; //The following line is where the program sends "SIGABRT" icon = [UIImage imageNamed:[NSString stringWithFormat:@"pin_%d.png", [place.iconN intValue]]]; [iconView setImage:icon]; } Here are a few parts from my "model" which is called Place.h/.m. Here is where I create the property for 'iconN'. @property (retain, nonatomic) NSNumbe

iPhone Distribution certificate not reachable in Xcode 4

Without my iPhone Distribution Certificate set within XCode 4 (on Release and Release-> Any iOS SDK) I get Code Sign Errors when I attempting to upload with Organizer/Application Loader (this is an update to an existing app). I have the distribution certificate in the keychain but I'm not able to bring it up (or enter it manually, tried name, serial number and user-id) within XCode. I have attempted deleting and re-installing the certificate, restarting Xcode and the system but I'm not able to correct this. I have also manually deleted the provisioning links within the .pbxproj file and cleaned but I'm not able to get this to work. Anyone know how to bring up the distribution certificate within Xcode 4?

Use a pool to spawn images

Hi every one here is my code: -(void) createNewImage { [imageView setCenter:[self randomPointSquare]]; [[self view] addSubview:imageView]; [views addObject:imageView]; [imageView release]; ix=imageView.center.x; iy=imageView.center.y; [XArray addObject:[NSNumber numberWithFloat:(240 - ix)/diviseurVitesse]]; [YArray addObject:[NSNumber numberWithFloat:(160 - iy)/diviseurVitesse]]; } -(void)moveTheImage{ for (NSUInteger i = 0; i < [views count]; i++) { imageView = [views objectAtIndex:i]; X = [[XArray objectAtIndex:i] floatValue]; Y = [[YArray objectAtIndex:i] floatValue]; imageView.center=CGPointMake(imageView.center.x + X, imageView.center.y + Y); } With this code, image are created and move to the center of the screen but after some seconds the performance decrease and come to 30fps. I would like to keep fps at 60 but I don't know how to proceed.Some people say that I can use pool but it's hard for me to use it because I don't really know how to us

Resigning keyboard on touch

I've found some code that helps me resign the keyboard when a user touches the screen off of the UITextView element. Here's how it looks: -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ UITouch *touch = [[event allTouches] anyObject]; if([self.speechBubble.speechText isFirstResponder] && [touch view] != self.speechBubble.speechText){ [self.speechBubble.speechText resignFirstResponder]; } [super touchesBegan:touches withEvent:event]; } This works perfectly so far, and will remove the keyboard if a user touches anywhere outside of the text view. However, it only works for the particular object that I'm running it for, so if I have two speechBubbles, it won't work. How can I change this so that ANY speechBubble will have the same effect? (I could move this code from my ViewController to my SpeechBubble class, but I'd have a little issue with how to use [touch view] to get touches outside of the speechBubble's view. ) Thanks

Go to Navigation Controller scene from Navigation Controller that is inside a Tab Bar Controller

I've got following hierarchy in my storyboard: Navigation Controller A -> UIView B (without Nav bar) -> Tab Bar Controller C -> Navigation Controller D -> UITableView E (with Nav bar D and Table bar C) Now I want to go from UITableView E to UIView B. When I use a push segue, my Tab Bar Controller C and Navigation Controller D is preserved. I don't want that. My full scene has to be replaced with UIView B that doesn't got any Nav or Tab bars. How do I achieve this with storyboards?

Why is UIGroupTableViewBackgroundColor causing Xcode 4.2 to choke?

I'm using Xcode 4.2 on Mac OS X Lion 10.7.3 and for some reason, every time I set UIGroupTableViewBackgroundColor as the background color on my UIView, the compiler refuses to build my app. When I open the "newly corrupted" XIB as XML and remove the offending XML represenation of the background color, the app compiles. I am able to apply the background color in code, but doing so in Interface Builder fails miserably. Here's the code that chokes Xcode. Any clue why this is happening? <object class="NSColor" key="IBUIBackgroundColor"> <int key="NSColorSpace">10</int> <object class="NSImage" key="NSImage"> <int key="NSImageFlags">549453824</int> <string key="NSSize">{512, 1}</string> <array class="NSMutableArray" key="NSReps">

Using Source Control with git and new projects

I'm new to SCM and I've managed to create and use a repository for an existing project. By following a variety of posts, I've done the following: 1) Created an account on Assembla 2) Used bash/git in my existing project directory to add, commit, and push the project 3) Used Source Control in XCode to pull, modify, commit, and push changes Now I want to start a new projection Xcode, and it seems I have to go through the same steps, using a mixture of Xcode 4.2 and bash commands to get the new project into Assembla. For example, I created a new space on Assembla "newjunk", started a new project in Xcode "newjunk" and did NOT check "create local git repository". I did not run any bash/git commands. In Xcode I cannot "push" because I did not "commit", and I can't "commit" because "no valid working copies were found". Is this the only way to get a new project into a remote repository? Or can