Newest ios Questions

Q&A for professional and enthusiast programmers

Swift 3: Sharing a calendar I've already made with others within my app?

Through the Calendar app in iPhone you can click on the "i" and share the calendar with someone through their email and I was wondering if there is a way I can do that inside my app. Currently, my ...

Swift3.0 how to set user login state for app launch? [on hold]

In basic project, we use UserDefaults to store the user login state, and save most properties. We also use singleton for sharedUser. For the first time when user login, we save them. When user reopen ...

Why can't I access a ViewController variable inside of a function (Swift3)?

This is driving me insane. This should be the simplest thing in the world, and it is just not working, no matter what I try. What I am trying to do is very simple. There is a text field and a button ...

round number in swift to produce one int at a time in output

Ok guys, I am in a bit of a dilemma, so I got a collectionview and I am trying to find which image the user is on so i decided to create a variable x which is equal to the collectionviewcontentsize / ...

Which all keys in Bluetooth Keyboard to force Screen-Lock Android and iOS phone

Once I paired by phone with a Bluetooth keyboard which all "keys" (like in windows is Win+L) should be pressed in order to screen-lock my Android and iOS phone. In fact, I am not using Bluetooth ...

Unable to replicate constrains programmatically

I want to add these constrains programmatically in my code: So far I got this: self.view.bringSubview(toFront: sceneView) sceneView.bottomAnchor.constraint(equalTo: canvasUnderReference....

Table view deletion (swipe-to-delete) not animating

I have an issue with table view deletions. The last section in the table view animates fine, but the others don't. Here's I populate the table view: import UIKit import Firebase var items = [Item]()...

Animate partially along a curve using Swift 2.3

I am fairly new to Swift and unfortunately locked into a project using 2.3 and was hoping to create an animation outlined in the gif below. Basically, there are 8 UIViews that all start on same point ...

“Ionic serve” starts but not work

I have a problem with my projects. I reinstalled windows in my notebook some days ago, I installed all for using ionic (I followed a tutorial, the same one that the previous time helped me install ...

How to instantiate any view first inside a container page view controller?

So I have a container view which holds 3 view controllers. When I launch the app I believe all 3 views instantiates. The issue I am having is this app is deep linking to a 4th view which plays a video ...

I have to allow user to login by application through Facebook, instagram or google account

I have to allow user to login by application through Facebook, instagram or google account. How to achieve this in my application ?

Calculating word count from a url in swift

I'm creating a reading list app, and I'd like to pass the read time of a user added link to a table cell in their reading list - and the only way to get that number is from that page's word count. I'...

How to pass data between container view and main view controller properly

I'm dealing with following problem: On main VC I have a TableView, and on container view controller I have a textField. I want to add every text, I'm typing in container automatically appears as a new ...

Handle multiple unauthorised requests after access token expires

I've searched a lot before I post my question but unfortunately I wasn't able to find a solution to my question. I develop an app that connects to a server that requires authentication using access ...

Get file size from a URL in Swift 3 [duplicate]

I'm developing an ios application and I need your help to get size of files hosted on a remote web server. When my app starts for the first time, it downloads different files in the user's ...

Use Push Notification payload when App launches via the Notification

I was wondering how I can make use of the payload of a push notification, when the user is launching the app via opening that notification. Is this possible? I want to implement an action which ...

IOS10 fullscreen safari Javascript

I'm trying to make a div go fullscreen, when a user clicks a button on a website. Only thing is, every browser seems to want to work except for Safari on IOS. What will I need to do to be able to ...

How to disable UI rotation in iOS, but rotate in VoiceOver?

I am attempting to replicate the experience of the iOS camera where, upon rotation, the UI itself does not rotate, but the individual elements do. Visually I was able to replicate the effect perfectly ...

Delphi iOS Simulator error message 'Session ended'

I am trying to run iOS Simulator from Delphi having setup the following needed configurations: I am using mac with Parallel Desktop for my RAD Studio virtual machine. I am using Delphi 10.1 Berlin. ...

How can I convert the following code about CGContext into Swift3

Just like the headline ,I have some Objective-c code ,how can I use them in Swift3 CGContextSaveGState(context); CGContextSetTextMatrix(context, CGAffineTransformIdentity); CGContextTranslateCTM(...

UICollectionViewCell GetCell

In the UICollectionViewCell GetCell method when I scroll down I do not experience any problems.However, when I scroll up i get a object reference null pointer. I am a bit confused as I am not well ...

iOS - Facebook login using settings Facebook account without web view - Swift 3

I'm working on a Facebook login button on iOS with Swift 3, and it works but I'd like to know how to create a Facebook login button which doesn't open a new web view page for asking permissions, like ...

UITableView didSelect not working in swift 3.0

When i select any row than didselect is not getting called.It's color also changes to blue on selection. but didSelect is not working.Delegate, DataSources and Table outlet are also connected. Here is ...

How to disable rotation animation for iPhone and iPad devices

I have used the following code from these questions to disable the rotation animation. It works for for iPhone devices but does not work. The view controller in question is the root view controller ...

Detect Touch on Edge of the UIVIEW

How to detect the touch on the edge or border of the view in iOS Swift. I want to increase UIView width and height when the user drags the border of the UIView.

In Swift how do I access data in my second ViewController from my third ViewController?

I an trying to run the code below so that my ThirdViewController can mirror its "myOrder" variable based off of the one in SecondViewController. But I am getting a runtime error "Swift dynamic cast ...

I don't want to extent in CIGaussianBlur of CIFilter

When I apply GaussianBlur, the edge is remained like this case I know the problem that is image size. Blur effect is become bigger than source image. But I don't know how to apply original image size ...

Swift 3: Get an action button to trigger a TableView

Good day, I would like a button outside my table view that would trigger showing the table view (TableView text blank at first, then for it to show after I click the action button). All of this ...

React Native App using Google Books API

I have begun to develop a book-searching application using React and Google Books API. However, I have run into an error where my simulator reads: Element Type is invalid: expected a string (for ...

Why can I not pass my delegate?

How can I pass the value of didTap to ReminderViewController using delegates ? Here is my code from CustomCell which has didTap protocol BEMCheckBoxDelegate { func checkBox(cell: CustomCell) } ...

How can I track a user's continuous location in iOS (Swift) whenever they enter or exit certain places?

I'm building an application which has the following requirements: There are X number of locations that the user can check-in or check-out from. Whenever the user enters any of the X locations, I need ...

Read data through Audio Jack iphone

I am looking for a way to read raw data that is being sent from the Arduino through iPhone's audio jack. I searched a lot and found this which detects whether a jack plug is connected or not but ...

UITextField leftView not triggering delegate

I'm using a subclass of UITextField in my TableViewCell. The delegate is set and whenever I tap the textfield, the delegate is called accordingly. However, I've set the textfield's leftViewMode to ....

ScrollView inside TouchableOpacity

I'm trying to set a horizontal ScrollView inside a TouchableOpacity component (for necessary reasons). However the TouchableOpacity overrides any horizontal scrolling capabilities and executes the ...

Show MasterView first instead of Details

I have a splitview with Master (showing table view) and Details (Showing detail data). When I launch my app it shows detailview first with no data but I need to show masterview first. I know that ...

Unable to send laravel push notifications to ios mobile using godaddy server

I am doing project in laravel. I have used davibennun/laravel-push-notification in my project to send push notifications to both android and ios devices. At localhost its working fine but when i ...

Why does a UICollectionView not set isSelected to false for a cell that has isSelected set to true in cellForItemAt? [duplicate]

I'm working with a UICollectionView with the default selection rules (single selection only). In my custom UICollectionViewCell class, I've overridden isSelected like so: override var isSelected: ...

setTintColor: doesn't redraw UIImageView immediately

I have a UIImageView in UICollectionViewCell, and the image on UIImageView uses UIImageRenderingModeAlwaysTemplate render mode. When I click the cell I will change the tintColor of UImageView, but I ...

Understanding unowned vs weak IBoutlets

Referring statement: Use an unowned reference only when you are sure that the reference always refers to an instance that has not been deallocated. Weak and unowned can be used interchangeably for ...

Main thread runs asynchronously or synchronously in iOS? please explain with Example

Is Main thread runs asynchronously or synchronously in iOS?Is Main thread runs asynchronously or synchronously in iOS

How do I make a UIImageView fill a UITableViewCell?

This is my first post, so if there is something that I should do differently, please let me know! I'm making a photo app, where the I want the photos to fill the UITaleViewCells, and the Cells to ...

Audio and video are not synchronized when ios play m3u8

My server receives video and audio stream and mux them into ts slice. At the same time, generating the m3u8 file. For the same m3u8 file, when I use fflay to play it, it works well, and audio and ...

Native Component doesn't appear in javascript side

I try to create RCTMap example with swift. I can access to my custom component from javascript, but the map does not appear and I get blank white view. MyMapManager.swift: import Foundation @objc(...

Outlook iOS Unable to Signin after using for some time

I am unable sign in after using application for some time. If we reset the device and retry to signin , It works without any issue. What could be the problem ? Using below Pods: - pod 'Office365' ...

How to retrieve specific value of key in json?

this is my json content. [ { "sha":"30eae8a47d0203ac81699d8fc2ab2632de2d0bba", "commit":{ "author":{ "name":"Madhura Bhave", "email":"mbhave@pivotal.io", ...

Sending Multiple UNUserNotificationCenter Notifications

I'm creating an Alarm Clock app and using UNUserNotificationCenter to schedule future alarms. The user should be able to select Monday +/ Tuesday +/ Wednesday .. etc .. When creating a single ...

How to run a webcam on an Apple machine and show a script on the cam screen from a browser

I have a website with a function that allows me to access the cam and display a script on the cam screen on my Pc, However this function is not working on Apple machines , WHY ?????? IS it possible ...

self nil when calling popToRootViewController - error: _swift_abortRetainUnowned

I'm getting a _swift_abortRetainUnowned error when calling popToRootViewController from within a pushed ViewController. I've checked and self is nil when it shouldn't be... Here is the full error: ...

Unable to add target and run function on UIBarButtonItem click in iOS Swift 3

I'm unable to detect on-click events on UIBarButtonItems in Swift 3. Can anyone help? I need to perform a segue to another storyboard and view controller on clicking the UIBarButtonItem.

Playground execution aborted: error: Execution was interrupted, reason: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

var str = "Hello, playground" let newTypeString = NSString(string: str) // here is the error // NSString(string: String)
Translating... 0%