iOS Development is easy with XCode, Swift3, UITableView, cocatouch, let's build iPhone, iPad and Macbook Applications.

CGSize sizeWithAttributes in Swift

In objective-C I was able to use: CGSize stringsize = [strLocalTelefone sizeWithAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14.0f]}]; But in Swift Language I didn’t found any solution for this situation. Any Help?

Perform Segue from App Delegate swift

I need to launch a view controller from the app delegate. In the way you would perform a segue between view controllers. I have an if statement that if true needs to show a view controller, this is in the app delegate. How do I do this from the app delegate?

How to create padding(spacing) between rows in tablview

This isn’t a duplicate I read the other questions regarding this and none of them gave me what i needed , I’m creating a table view with custom cell and the style is grouped. I have 1 ImageView inside each row that is smaller then the whole row.How many cells I need to create is […]

Convert a UIView origin point to its Window coordinate system

I want to get the origin of scrollView in the window coordinate system. For Example, presently, scollView origin is (0,51). But in window coordinate system it should be 51 + 44(navigation bar height)+20(status bar height) = 115. Means in window coordinate system the scrollView.frame.origin should be (0,115). I tried with convertPoint: methods but getting (0,51) […]

Facebook iOS SDK: Cannot specify an album using FBRequest's requestForUploadPhoto:

I have a local photo in my iPhone app, and I want to upload it to a specific album on Facebook dedicated to my app. Problem: My app name ends with the word ‘Photos’, so the default Facebook album is APP_NAME Photos Photos – obviously a problem. Goal: I want to create a new album, […]

Use a UITabBar without UITabBarController to control a UIWebView

I want to use a UITabBar to let the user navigate a single UIWebView. Is this possible or would I be better off using a UIToolbar? If better off using a UIToolbar, how would I simulate the “selected” visual state of a button, the way UITabBar natively does?

Couldn't play system sound after switching to iOS 5

This is how I played a beep sound effect in iOS 4: SystemSoundId beepOnSoundId; CFURLRef soundUrl = CFBundleCopyResourceURL( CFBundleGetMainBundle(), CFSTR(“beep”), CFSTR(“wav”), NULL ); // soundUrl logged: // file://localhost/var/mobile/Applications/ … beep.wav AudioServicesCreateSystemSoundID(soundUrl, &beepOnSoundId); // beepOnSoundId logged: 4097 AudioServicesPlaySystemSound(beepOnSoundId); It stopped working, when I upgraded my device to iOS 5. I hear nothing. I logged out all […]

Swift How to change UIAlertController's Title Color

How do I change the UIAlertController’s Title font using Swift? I’m not talking about the message color, I’m not talking about the buttons color. I’m talking about the Title.

INVALID BINARY : Your binary is not optimized for iPhone 5 As of May 1

I had imported all 3 Launch Images First 1: 320 x 480 2: 640 x 960 (Retina 3.5-inch) 3: 640 x 1136 (Retina 4-inch) they have the following default names that are needed: 1:Default.png 2:Default@2x.png 3:Default-568h@2x.png and Get the rejection with the warning : iPhone 5 Optimization Requirement – Your binary is not optimized for […]

Header Displaced in TableView with UIRefreshControl

My UIRefreshController is doing something odd. When I pull-down refresh, the tableView headers are displaced. If I pull-down it looks fine, but if I scroll down the table while the refresher is still working, the headers are offset by the height of the refresh control while the UITableCells are fine and scroll behind the header. […]