Draw a titanium road

this is my code: var win = Ti.UI.createView({ left : 0, top : 0, right : 0, top : 0 }); Ti.UI.currentWindow.add(win); var mapview = Titanium.Map.createView({ mapType : Titanium.Map.STANDARD_TYPE, region : { latitude : 0, longitude : 0, latitudeDelta

Swift: The unpacking force is zero and yet no crash?

The Facebook SDK (4.x) has a delegate protocol that force unwraps the error that is returned. extension FacebookLoginViewController: FBSDKLoginButtonDelegate { func loginButton(loginButton: FBSDKLoginButton!, didCompleteWithResult result: FBSDKLoginM

How to display an Alamofire JSON request by pressing a button?

I am attempting to build a simple iOS app that features a login but first I want to make it so that pressing the "Continue" button on sign up posts data to the REST api. I can't successfully bind it to a button press for some reason. The code be

iOS - Set the maximum width for UILabel with Autolayout

I have a UILabel contained in a UIView that has a fixed size. The UILabel has dynamic text. How can I make sure that the UILabel will never get bigger than the containing UIView? Before using AutoLayout this was quite simple to achieve by simply usin

Geofencing UILocalNotification Does Not Work Properly

I am facing a strange problem with local notification in swift. I am presenting local notification like this let notification = UILocalNotification() var body = "Hi Krishna"; if(region.identifier == "entry1") { body += " Welcome&q

How to give button exit functionality in iOS

I am designing two pages, one followed by the other, in Xcode 7. Let's call them the first and second view controllers. From a button in the first view controller, with a modal segue, the second view controller shows up. I want to add a button to sec

Copy UIImageView image into UIView

I wish to copy an image from the UIImageView to UIView. I have written the swipe gesture for the UIImageView to select images and need to know how to duplicate multiple images from UIImageView to UIView when user click the Add button. I want user to

Am I using NSNotifications too much

I recently found the benefit of using NSNotifications when making very custom layouts in my iOS app. I now use them to send data round instead of using delegates. For example I have a UIScrollView in one controller, which varies the alpha of a pictur

Background thread method not solving blocking problem

I have my app freezing issue, So i used Instruments to find the issue and found that issues are related to CoreData save and fetch. I have tried background coredata method (parent-child, Notification) but my issue has been not resolved. Also I referr

Can not Find iPad Air 2 with iOS 8.1.2 Simulator on Xcode

I'm having a problem with the Apple review process. They rejected my app newest version because it had an issue when running on iPad Air 2 with iOS 8.1.2: "We found that your app exhibited one or more bugs, when reviewed on iPad Air 2 running iOS 8.1

Using Images.xcassets in XCode 6 beta

I have a project where I use Images.xcassets to organize my image resources. After update to XCode 6 beta no image is displayed when the application runs. It looks like XCode can't find path. I found a temporary solution – old way: Add folder with im

update an attribute using basic data

I have an entity that has 3 attributes: firstname, lastname and score. i am able to search the score of a person by firstname and last name and display it on an UILabel (so far so good) my problem is that i don't know how to update the score attribut

Detect autorotation in UIView subclass

I'm creating a subclass of UIView that needs to relayout its subviews when the orientation changes. it needs to be able to "plug in anywhere" without any extra code so I'd rather not rely on the UIViewController methods to detect the autorotatio

Customizing the iOS Camera: How to Implement Grid Lines?

I am able to use the flash feature, access the photo gallery, and use the rear/front camera. I would like to implement grid lines that display when the user is taking a photo. Any ideas?Create a UIImageView to use for the cameraOverlayView. Assuming

IPhone plays integrated video in full screen

i created a small website that includes a video with this code: <video autoplay="autoplay"> <source src="inc/WEB_MASTER.mp4" type="video/mp4"> <source src="inc/WEB_MASTER_ios.m4v" type="video/mp4

Show / hide the display in xCode in the same file?

How can I show and hide a view using xCode in the same file .xib?Progmatically set YES to hide view else NO yourView.hidden=YES; Or if you want to do it in .xib file then in your attribute inspector in view section, under drawing checkmark hidden to

iOS How to fill NSMutableArray with searchString?

I want to collect all searchString from UISearchBar when the user clicked the button "x" to a mutable array, but however it is being added no object to self.historyList.... In the method: - (void)searchBar:(UISearchBar *)searchBar textDidChange:

Enable / disable camera app programmatically

Is there a way to programmatically restrict camera access on iPhone 4S 5.0.1? I am building a simple app with a button to enable/disable shooting with the camera. I believe it should work in the similar way as the restrictions work in Settings app. I

NSDateformatter returning zero?

My NSDateFormatter is retuning nil. This is an example string that I want to parse: @"6/23/11 0:42" and this is the format i am using: [dateFormatter setDateFormat: @"MM-dd-yy HH:mm"]; What am I doing wrong? Thanks.Your date string has

iOS Objective-C access to ivars of different classes

What is the preferred method of accessing ivars from different classes? Application Delegate Class Say I want to access the root controller (@synthesized as rootController) from the Application Delegate class in another UIViewController class. I've r