Tag: xcode

custom viewcontroller delegate not working

i’m having issues on my custom delegate, not sure why is not working.i wan to pass the delegate to the mainview so it will auto push to a detail view after adding a new record. Not sure what i have missed out.i’m doing all the linkage with storyboard & iOS 5. thanks for looking and […]

on top tabbar controller or segmented

so guys, i’ve been wondering, currently i’m in the middle of learning on developing apps. i saw a CNBC apps at ipad that looks like the image here : (sorry, new user cant directly post image D:) http://img.ioscake.com/iphone/1291813093.usr105634.jpg my question is, what are those 2 bars on top of the app??(the one with markets, and […]

How to add description to the UITableView

How can I to add a description like “California” in this image.

How to see plist variables result from Xcode

I have an info.plist file with variables inside, such as ${PRODUCT_NAME} or ${EXECUTABLE_NAME}. Where does there variables reference to? And how do I know these variables will be converted into what string by Xcode?

why does it matter if the #include are in the .h file or in .cpp file?

I have a cpp file contains this include: #include “twitServer.h” and in twitServer.h I have: #ifndef twitServer_twitServer_h #define twitServer_twitServer_h #include <string> #include <map> #include <iostream> #include <cstdio> #include <cstdlib> #include <iostream> #include <list> #include <sys/socket.h> #include <sys/time.h> #include <netinet/in.h> #include <arpa/inet.h> #include <cstring> #include <netdb.h> #include <errno.h> #include <sstream> #include <algorithm> #include <ctime> #include <stdio.h> […]

Selecting the text just updated with replaceRange(range: UITextRange, withText: String)

I’m changing the content of a UITextView with the following code: mainTextField.replaceRange((theRange), withText: newStr) Then I would like to select the new text. I’m trying to use the following code: mainTextField.becomeFirstResponder() let startPosition = mainTextField.positionFromPosition(mainTextField.beginningOfDocument, inDirection: UITextLayoutDirection.Right, offset: startingPoint) let endPosition = mainTextField.positionFromPosition(mainTextField.beginningOfDocument, inDirection: UITextLayoutDirection.Right, offset: endingPoint) if startPosition != nil && endPosition != nil […]

Reading off annotations of MKMapViews in NSArray

I am trying to find the coordinates of an annotation in many MKMapViews in this way: NSMutableArray *latitudes = [NSMutableArray array]; for (MKMapView *map in MapViewArray) { NSString *latitude = [NSString stringWithFormat:@”%.2f”, [map.annotations lastObject].coordinate.latitude]; [latitudes addObject: latitude]; } NSMutableArray *longitudes = [NSMutableArray array]; for (MKMapView *map in MapViewArray) { NSString *longitude = [NSString stringWithFormat:@”%.2f”, [map.annotations […]

Project wont run on simulator in xcode 8

After upgrading to xcode8, my project will no longer run on the simulator (runs on a device) Error: /Users/johnsmith/Library/Developer/Xcode/DerivedData/JT-fnslglvifmonzwhlgrchcqujqiwt/Build/Products/Debug-iphonesimulator/ Assets.bundle: Is a directory Command /usr/bin/codesign failed with exit code 1 I have deleted the entire deriveddata folder and cleaned the project several times with no success. Any ideas how to fix please?

device rotated but screen not stretches

in my iphone app i have returned yes in the following method ,its worked and screens are rotating but contents are not fitting to the screen when its in the landscape mode following is the code which i used – (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } following is my output how can i fit the contents […]

No Symbols found for architecture. Xcode 4.3

I have having an issue when I add new classes to an Xcode Solution, I cannot compile it. I take the same class and add it to a new project and it works just fine. This is what i am getting. Undefined symbols for architecture i386: “_OBJC_CLASS_$_RIButtonItem”, referenced from: objc-class-ref in MenuViewController.o ld: symbol(s) not […]