天道酬勤,学无止境

xcode

UIButton not showing the text in iOS6

I am working with iOS6 and Xcode 4.5, I am getting an UI issue with some UIButton, some of the buttons title are not getting shown in my view. In an older version of iOS everything works as expected. Please see the following image. It's not showing the text "Button" while executing it on simulator

2022-01-19 02:41:19    分类:问答    iphone   objective-c   ios   xcode

Checking for valid IP for connection with NSURLConnection

I currently have an ap that attempts to open a webview based on certain servers I am communicating with. However, I allow the user the capability to type in their own server IPs in case both the iphone/ipad and server(or other device) are not on the same network. However, I am attempting to use NSURLConnection to detect if I can open a connection with the given IP however NSURLConnection never returns an error, even if the server address(or even a random web address) is completely bogus. the .h @interface DetailViewController : UIViewController <UIPopoverControllerDelegate

2022-01-19 02:20:45    分类:问答    iphone   objective-c   ios   xcode

sqlite 3 opening issue

I'm getting my data ,with several similar methods, from sqlite3 file like in following code: -(NSMutableArray *) getCountersByID:(NSString *) championID{ NSMutableArray *arrayOfCounters; arrayOfCounters = [[NSMutableArray alloc] init]; @try { NSFileManager *fileManager = [NSFileManager defaultManager]; NSString *databasePath = [[[NSBundle mainBundle] resourcePath ]stringByAppendingPathComponent:@"DatabaseCounters.sqlite"]; BOOL success = [fileManager fileExistsAtPath:databasePath]; if (!success) { NSLog(@"cannot connect to Database! at filepath %@",databasePath); } else{ NSLog (@"SUCCESS

2022-01-19 02:17:26    分类:问答    iphone   ios   xcode   sqlite

xcode bots edit failed

I am running OS X Server(5.0.4) and xcode 7. I am able to crete bots successfully but when I edit an existing bot, xcode throws this error : Internal Error Updating Bot, please try configuring the bot again How do I solve it?

2022-01-19 01:54:23    分类:问答    xcode   bots   osx-server

How to make math equations in Xcode?

I am a total beginner with Xcode and Objective C, but I have some experience with OOP in C++. I bought this book. I read about how to make a simple app, and skimmed the rest of the book. What I want to do is make an iPhone app people can use to look up math equations such as the quadratic eqauation, pythagorean identity, etc. I plan to include a lot of stuff, and do a lot of things better than other apps I have seen. However, before I pay Apple $99 to be a full fledged iOS developer, I want to know that it isn't too hard to make the Greek letters and Math notation that we see in math books. So

2022-01-19 01:53:33    分类:问答    xcode   xcode4   xcode4.2   xcode4.3

xcrun avgtool xcrun: error: unable to find utility "avgtool", not a developer tool or in PATH

Unable to automatically update the version number in Xcode using below command xcrun avgtool xcrun: error: unable to find utility "avgtool", not a developer tool or in PATH Tried below options Added Developer_DIR PATH in .bash_profile and appended to path like below export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer" export PATH="/usr/local/bin:$DEVELOPER_DIR:$PATH" Also updated the command Line tools by navigating to Xcode -> Preferences -> Locations -> Command Line Tools: selected Xcode 10.1 from drop down. Any help will be really appreciated.

2022-01-19 01:45:53    分类:问答    xcode   xcrun

Can't Modify MPRemoteCommandCenter Actions when using MPMusicPlayerController

My app uses MPMusicPlayerController.systemMusicPlayer() to play audio which works well. The user is able to set a custom currentPlaybackRate. This works as expected. If the user presses an action on the lock screen (the MPRemoteCommandCenter), the currentPlaybackRate is reset to 1. This is because events are sent directly to the system music player, not the app controller. To set the currentPlaybackRate to the proper value, I tried to override MPRemoteCommandCenter events: override func viewDidLoad() { super.viewDidLoad() AVAudioSession.sharedInstance().setCategory

2022-01-19 01:36:57    分类:问答    ios   xcode   ipod   mpmusicplayercontroller

Swift 3 / Alamofire: Cant load the table with the data

I am trying to load the data on the UItableview, I am able to see the records fetched in the output panel but not able to fetch them on the UItableview. Please find the code below: import UIKit import Alamofire import SwiftyJSON class CategoryViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, NSURLConnectionDelegate { var tableData = Array<Category>() var arrRes = [[String:AnyObject]]() //Array of dictionary var category = [Category]() var catTitle = "" var id = "" @IBOutlet weak var catTitleRec: UILabel! @IBOutlet weak var tableview: UITableView! override func

2022-01-19 01:30:12    分类:问答    ios   swift   xcode   swift3   alamofire

How to use g++ in terminal in mac?

I've installed Xcode and I can compile .cpp files in Xcode. However, I wanna use g++ in Terminal but command not found: g++ now. My OS is Mountain Lion Xcode version is 4.4.

2022-01-18 22:36:20    分类:问答    xcode   macos   terminal   gdb

Importing 3rd party library ZXing into Xcode

I've tried a number of ways to import the 3rd party library 'ZXing' into my iOS app, but all have been painful or have simply not worked. If anyone could suggest either what I'm doing wrong, or a better way to import a library such as ZXing, I'd be very grateful. It must be easier than this!!! This is what I've done, with results : Directory structure of MyGreatApp (at time of writing) /MyGreatApp/MyGreatApp.xcworkspace (main workspace that compiles the application) /MyGreatApp/Projects/MyGreatApp/MyGreatApp.xcodeproj /MyGreatApp/Projects/MyGreatApp/(All source code for MyGreatApp) /MyGreatApp

2022-01-18 22:30:04    分类:问答    ios   objective-c   xcode   xcode5   zxing