Generate gcda-files with Xcode5, iOS7 simulator and XCTest

Update 1: After reading a bit more about this, 2 things have now become clear to me (emphasis added): Tests and the tested application are compiled separately. Tests are actually injected into the running application, so the __gcov_flush() must be called inside the application not inside the tests. — Xcode5 Code Coverage (from cmd-line for … Read more

UILabel and NSLinkAttributeName: Link is not clickable

I can answer my own question now: I am using UITextView instead of UILabel now. I have formatted the UITextView to look and behave like my labels and added: UITextView *textView = [[UITextView alloc] init]; textView.scrollEnabled = NO; textView.editable = NO; textView.textContainer.lineFragmentPadding = 0; textView.textContainerInset = UIEdgeInsetsMake(0, 0, 0, 0); textView.delegate = self; Don’t forget … Read more

SKNode convertPoint toNode & fromNode confusion?

– (CGPoint)convertPoint:(CGPoint)point fromNode:(SKNode *)node This essentially is saying: convert a point expressed in another node‘s coordinate system into the caller’s(self) coordinate system. The key is that the point has to be expressed in the node’s coordinate system for this to work. If you are using a sprite’s position as the point, you will need to … Read more

Adjust letter spacing in iOS 7

You can adjust letter spacing like this, using NSAttributedString. In Objective-C: NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:@”The Clash”]; [attributedString addAttribute:NSKernAttributeName value:@(1.4) range:NSMakeRange(0, 9)]; self.label.attributedText = attributedString; In Swift 3: let attributedString = NSMutableAttributedString(string: “The Clash”) attributedString.addAttribute(NSKernAttributeName, value: CGFloat(1.4), range: NSRange(location: 0, length: 9)) label.attributedText = attributedString In Swift 4 and later: label.attributedText = NSAttributedString(string: “The … Read more

ios: Application tried to present a nil modal view controller on target

As per Apple, You should check is MFMailComposeViewController are able to send your mail just before sending if ([MFMailComposeViewController canSendMail]) { MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; picker.mailComposeDelegate = self; [picker setSubject:@”Test mail”]; [picker setMessageBody:messageBody.text isHTML:YES]; [self presentViewController:picker animated:YES completion:NULL]; } Swift: if MFMailComposeViewController.canSendMail() else { // Send mail code } Ref : Apple Dev … Read more

UIToolbar setBackgroundColor doesn’t fully change color

Write below code in your viewDidLoad self.navigationController.toolbar.barTintColor = [UIColor redColor]; It will set red color as your tool bar background. Reference link https://web.archive.org/web/20160321155823/https://developer.apple.com/library/ios/documentation/userexperience/conceptual/TransitionGuide/Bars.html#//apple_ref/doc/uid/TP40013174-CH8-SW5 In it they said that Use barTintColor to tint the bar background.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)