How to make an open video and play the button click on iOS

I'm very new to iOS and have very little experience. Please could someone show me how to code my app so a video open and play on button click? I canĀ“t find out how to do this anywhere. Any help would be much appreciated.I think this code will help yo

How to add multiple NSArray objects to an NSDictionary key

This question already has an answer here: Rebuild an NSArray by grouping objects that have matching id numbers? 5 answers I have a Object with some keys/values. After that, It was added into a array. ContactAlphaB *contact = [ContactAlphaB contactWit

How to load a resource in cocoapods resource_bundle

I have struggled a lot to how to load resource in cocoapods resource_bundle. The following is what i put in the .podspecs file. s.source_files = 'XDCoreLib/Pod/Classes/**/*' s.resource_bundles = { 'XDCoreLib' => ['XDCoreLib/Pod/Resources/**/*.{png,st

The optional swift default does not make it optional

I set a default string value with the ?? operator. But i get an optional String? request(.GET, CUSTOMER_URL, parameters: params, encoding: .URL).responseJSON { (request, response, result) -> Void in var message = JSON(result.value ?? "")[&quo

how to get a loop value in another class c objective

i have this code in bezier.m for(int x = 0; x < [globalArray count]; ++x){ NSInteger numOfCurves = [globalArray[x] count]; UIBezierPath *linesegment = [UIBezierPath bezierPath]; for(int y=0; y< numOfCurves; y++){ [UIBezierPath makeControlPoints:glob

Fast SQLite SQL Account

In a Swift iOS 8 project with SQLite, I'm trying to get the number of rows in a table using the SQL COUNT function. From the examples I found in C, I came with this code: var nRows: Int32 = 0 func getNquestions() { let querySQL = "SELECT COUNT(*) fro

How to make constraint objects without VisualFormat in Swift?

I am manually adding a bunch of layout constraints that are for portrait mode. Now I want to make two sets of constraints, and flip between them based on whether the device is in landscape or portrait mode. I do not want to use "visualformatting"

Two-dimensional table with row / column highlighting

I need a table with N rows and M columns. The touch event in the table should cause highlighting of current column and row, and when released triggered an action. By means of what is possible to write such a table? I thought of using 2D array of UIVi

Prepare UIImage with many layers on the background wire

I have the problem that I have some really big UIScrollView and tons of images loaded on it as user scrolls. Images are stored on the device, however I receive information from server what to display on particular part of UIScrollView. When user scro

iOS 7 Background transfer service stops after 3 minutes

I have created a sample code to download a file from network repeatedly(every 30 secs or so). In iOS 7 using Background transfer services with NSURLSession I followed this tutorial http://mobile.tutsplus.com/tutorials/iphone/ios-7-sdk-background-tran

Pass a channel in the YouTube search bar

I am using UIWebView to allow the user to push a new controller which opens up YouTube. What I want to do is pass a string directly into the YT search bar. The string is the title of the previous view controller. So for example, say the user is looki

Insert a row to any index in TableView with custom cell

I'm newbie on iOS. I tried more time to search but the result is not my wish. The first, I have 5 rows with the custom cell. Cell contains only text and I want to add one row at any index with cell that contains one image. So how we can implement it

How to get the center of coordinates of gmsmapview in iphone

I'm use the new Google Maps SDK for iOS. Can i get true coordinate form GMSMapView.center ? now it return value of CGPoint but this not true coordinate. Thank and Regards.I suggest to use [yourMapView.camera target] instead of Jing's solution. Jing's

Custom UI iOS Button Images

I'm developing a iOS app that is using custom UIButtons with round shape. I wanted to add Image to these buttons and would like to know if I use IB to select an image from my project, do I have to also worry about 2x retina images for retina display?

AppDelegate to UIViewController

I have a sample code with a header and an implementation file and the two appDelegate files. I would like to add what the project does to my app. The first two files are a ViewController file, so I just need to drag it in, but the other two are AppDe

How to drag an image with Gesture Recognition Xcode

I have made a little test to drag views in a UIScrollView to UIView where I can call any action. I'm trying to be able to make the image I made in the UIScrollView Draggable. I have not been able to make this work. I was able to create test views whi

IPhone push notification character limit

I'm brand new to IOS push notifications. I have been reading about them and can't seem to find this information anywhere. I have read that the size limit on a push notification is 256 Bytes. Does this size limit include things such as the device toke

Manage memory on multiple views

I'm building an app that has a main view which consists of a Map View. A second view has some necessary configuration options (config view). I segue to this config view using a partial curl segue. The problem I'm having is the state of my config view

Custom font integration Arial-Narrow.ttf

I am having problem in using this font in my Application. I have imported the Arial-Narrow.ttf file in my resources and also added the name in the info.plist as follow <key>UIAppFonts</key> <array> <string>Arial-Narrow.ttf</stri

Load XIB into a UIView

I have a UIView that is not covering the entire screen of an iPhone... about 200 pixels by 300 pixels. I'm trying to load a xib into this view, but it seems to have an issue. The code works, but the UIView takes over everything at fullscreen... not a

Can iPhone development certificates be reused?

I've developed a number of apps for the iOS devices, and now I'm doing freelance work for other companies as well. We're at the point of getting all the certificates created, and I'm not clear on the right steps to take. I've been invited -- and join