Questions tagged [ios]

243434 questions
1

votes
1

answer
311

Views

How to set custom font with specific size to Web View in iOS?

I am trying to set Open sans with size 15 to a UIwebview. But i am not able to implement that successfully. This is what i have been trying so far let content = '' + jsonObject.stringValue + '' self.webViewOutlet.loadHTMLString(content, baseURL: nil) Can someone help to implement this Thanks in ad...
Jobins John
1

votes
0

answer
218

Views

Url loads via SafariViewController but not via WKWebView in iOS

I am running a demo project on iOS 11 device. There is a certain url which i am loading in SafariViewController using below code, which works fine. NSURL *url = [NSURL URLWithString:@'https://myCustomUrlHere']; SFSafariViewController *svc = [[SFSafariViewController alloc] initWithURL:url]; svc.deleg...
iPhoneDeveloper
1

votes
0

answer
47

Views

How to load a specific view controller in KIF tests?

Currently, am navigating through all view controller to reach a specific view controller for testing. But is there a way that I can load a specific view controller for testing that particular page?
fAiSaL
1

votes
1

answer
301

Views

Can UIApplicationOpenURLOptionsKey.sourceApplication be nil?

Recently after a new app update, we start getting crash in line let sourceApplication = options[UIApplicationOpenURLOptionsKey.sourceApplication] as! String in the following code. I am just wondering why it can be nil or is it crashing because of as! to string? func application(_ app: UIApplication...
kidsid49
1

votes
2

answer
323

Views

UITextField without get property swift 4

I have custom control which contains textField. Sample code looks like this: @IBDesignable class MyTextField: UIView { private var _text: String? private var textField: UITextField? @IBInspectable var text: String? { get { return _text } set (newValue) { guard let txt = newValue else { return } self...
emerog
1

votes
1

answer
27

Views

Bundler: Create Gem - Default Contact Info Source?

I followed this guide to build my first Ruby Gem: http://bundler.io/v1.12/guides/creating_gem.html Everything worked as expected, but I have one question: I noticed that Bundler auto-magically pulled my personal contact info from somewhere (I'm on a Mac) and used that to build the gem. An example o...
Pseudo
1

votes
1

answer
16

Views

How to distribute 4 components in UITableViewCell with autolayout?

I have a view with an UITableViewCell. In this custom cell like this: I have added the textFields into UIViews, and all uiviews have this constraints with autolayout: but then, when is running on device, all views are distributed with bad forms: The first uiview is deformed How could I add the const...
user3745888
1

votes
0

answer
179

Views

Error handling in AVAssetResourceLoaderDelegate

What is the recommended way for handling error in AVAssetResourceLoaderDelegate? specifically network requests in shouldWaitForLoadingOfRequestedResource / shouldWaitForRenewalOfRequestedResource? However, there is no way for my app to know something went wrong until I start playing the video. I tri...
noc
1

votes
1

answer
560

Views

WebView keyboard React Native

when I select a text field and the keyboard appears it spoils the layout, in case it raises the page but when the keyboard disappears the page continues raised my WebView code:
1

votes
0

answer
374

Views

React Native expo there was a prob loading this experience

When i run 'exp start' from command line. my react native app builds perfectly on simulator and on device. i also ran exp start --no-dev which i assumed was to show what would run with dev mode flag off when i run exp publish. When i run 'exp publish' i get There was a problem loading this experienc...
James Woods
1

votes
0

answer
42

Views

SpriteKit game deployed from TestFlight may not display correct on iPhones

I’m having an issue with games I’ve been developing for iOS using SpriteKit The issue deals with when the games are deployed through TestFlight and installed on iPhone devices. On some phones the games will not display correctly. They will appear zoomed in from the center and be clipped at the e...
Tron Thomas
1

votes
0

answer
738

Views

Swift - CABasicAnimation not working with CALayer

Here is my code about add a layer with animation added. let myLayer: CALayer = .init() let myAnimation: CABasicAnimation = .init(keyPath: 'bounds.size.height') // for myLayer to center of superview let centerPoint: CGPoint = .init(x: mySuperview.bounds.width / 2, y: mySuperview.bounds.height / 2) my...
Byoth
1

votes
1

answer
275

Views

How can I fix the following error in Xcode: Key Commands must all have a Title, Key, and Selector? [duplicate]

This question already has an answer here: Key Commands must all have a Title, Key and Selector 3 answers I have been trying to figure out why I am getting this error: Key Commands must all have a Title, Key, and Selector. Every time I open a new project, this error occurs before I change anything....
Jack Nordquist
1

votes
0

answer
44

Views

Cannot open viewcontroller - ios F# (performSegue and presentviewcontroller)

I'm trying to simply present a ViewController, however, this doesn't work using the PerformSegue method or the PresentViewController method, nothing seems to happen. I have verified using the debugger that the correct line of code is reached, I have also verified the names and IDs are correct. name...
Alk
1

votes
0

answer
142

Views

Animating between two images on MKAnnotationView

I am currently working on a map feature that contains annotations with custom pins. Currently I have all my annotations displaying with custom pins - a sort of bubble image and a larger bubble for the current selected pin. Everything works grand for iOS 9 and 10 but I have hit a slight snag with i...
Robert
1

votes
1

answer
433

Views

ios resize scrollview by containerview with tavleview inside

I have next structure of views: vc -view --safe area --scrollview ---view ----containerview1 ----containerview2 ----containerview3 -----tableviewcontroller(in containervew3) Tableviewcontroller has buttons which add or remove rows, I want to resize scroll view that it shows full tableview content(wi...
Anton Lisitsyn
1

votes
0

answer
69

Views

IOS - Connecting to bluetooth device in background periodically

I have a bluetooth device which connects to my iphone and i can perform all sorts of operations on the device. Its a tracking device and I log all sensor based data in the device. Since the device have a data limit, I want to read data from the device once every hour and dump it into a file through...
Kpatel1989
1

votes
1

answer
179

Views

save with file manager in swift4

I am trying to save the emojis in this app that I learned in apple book but the problem is that I don't understand the next steps in the book, create a static loadSampleEmojis() method that will create and return a predefined[Emoji]collection.You can use the list assigned to emojis in EmojiTableView...
user8058965
1

votes
0

answer
103

Views

Stucky dithering as custom CIKernel does not work

I'm trying to implement Stucky dithering (error diffusion) as a CIKernel but I am a bit lost. I don't find a way to debug the filter (I m new to CIKernel). Here is what I have came up so far, but the kernel does not compile, plus, I wonder how I could store the spreaded error to the destination pixe...
Stéphane de Luca
1

votes
0

answer
51

Views

Continue a cancelled download

I have a question regarding on how mobile OSs such as iOS and Android work regarding a cancelled download. I was wondering if there is any guaranteed way to restore a download from the point where it was cancelled. I do understand that for instance iOS does not provide access to its temporary downl...
std_move
1

votes
0

answer
20

Views

Pinning the bottom cell of a tableview on rotation

Just like in Telegram or Whatsapp, when the device rotates, the bottom cell should stay anchored to the bottom of the screen. However, when I rotate my device, the top cell is being anchored and stays foot. Couldn't find any solution online. Here is how I want a rotation to look like:
Nimrod Shai
1

votes
1

answer
86

Views

Feedback json format wrong

This is my feedback json string: {'name':'abc', 'cardNumber':'1234567890', 'data': [{A data},{B data}...]} I use this function to send data, then get json and encode: func uploadData(word:String){ var request = URLRequest(url: url!, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData, timeoutInterv...
Howard
1

votes
1

answer
151

Views

finding distance of a Autocomplete resulted location from current location IOS

I m working on application like Uber and Careem. When user searches for a location using Google Places Autocomplete API, I want to show the distance as well along with the name of the autocomplete resulted place like Uber and Careem does this. Plz have a look on this image for further clarification
Raja Saad
1

votes
1

answer
264

Views

Ionic 1 ios http get not working

I'm developing an application for IOS with Ionic v1. I have added cordova-plugin-whitelist plugin to my application. It doesn't allow me to use http calls only in IOS device. It's working fine in Android and Ionic Serve. Actually, it was working fine but I don't know why it stopped working. I remove...
Anıl Canlı
1

votes
1

answer
100

Views

Objective-C protocol delegate not working

I want to send back an array of objects to myViewController from myRenderer In myRenderer.h: @protocol myProtocol; @interface myRenderer : NSObject @property (weak) id myDelegate; @end @protocol myProtocol - (void)sendToMyViewController : (NSMutableArray *) objects; @end In myRenderer.mm (C++ / o...
Brian Scherady
1

votes
0

answer
97

Views

Missing some <keys> Your app has one or more issues, app rejected

We have discovered one or more issues with your recent delivery for 'MyAPP'. To process your delivery, the following issues must be corrected: Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSContactsUsage...
Arvindraja
1

votes
0

answer
80

Views

Swift - Upload/Retrieve images to/from Firebase

I want my users to be able to set their profile pictures in my application. I am holding the profile datas which contains the user's profile picture as a table view cell. However, I had problems in my code. This is my table view function: func tableView(_ tableView: UITableView, cellForRowAt indexPa...
atunaysaka
1

votes
0

answer
56

Views

Array filtration of String with contains is slow

searching text from an array of Product, but data is huge, and stuck ui view and keyboard. func searchText(text: String) -> [Product]{ self.filterData = text.isEmpty ? self.productCollection : self.productCollection.filter({(product: Product) -> Bool in // If dataItem matches the searchText, ret...
Ayaz Akbar
1

votes
1

answer
67

Views

jQuery Chained - don't work on iOS

I'm using this plugin to get chained select's. It's working with desktop browser (FF, Chrome, etc...) but when I want to use it on my iPhone it's not working. I can select options from first select (for example city). When I select city, my second select should have locals from this city and that'...
MMPL1
1

votes
1

answer
70

Views

Swift UITableViewCell reusing is messing up tags / app has wrong calculation

I am making unit converter app with custom cells, every cell has a textbox inside and the idea was when u enter the value in one unit all units get calculated automatically, the problem is only when there are more cells and when u need to scroll when cells get reused they mess up tags and because my...
Dusan Dimic
1

votes
1

answer
47

Views

How do I create a borderbody in SceneKit?

I'm trying to create a 3D Kite game in SceneKit, and I do not want my nodes to leave the screen. I know how to create a border body in SpriteKit. How do I do the same in SceneKit?
Mit Sengupta
1

votes
0

answer
46

Views

Keeping page layout in control updates

I have managed to create a custom renderer for Page in iOS that handles keyboard events and using Element.LayoutTo() I change the area that page renders to, and hence bring my controls into view while the keyboard is open. The problem is once any control changes (ex. a label text changes) the page l...
Emad
1

votes
2

answer
73

Views

Reset or clear iOS app badge without any app interactions like open the app or push notification

Any possibility to reset/clear app badge without any app interactions such as opening the app or any push/local notifications. My need is, I want to reset my app badge starting off every day without even opening the app or with any notifications.
anasaman_p
1

votes
1

answer
38

Views

how to detect tcp connection lost while internet connection lost for 5 sec in the ios

I am using socket connection in my app. The app is working fine while the connection is fine. While the internet is gone for 5 seconds and comes back then I am not able to detect immediately connection is lost.
Rahul Bangde
1

votes
0

answer
139

Views

Delay in changing connection status of Multipeer connectivity once the devices are disconnected from each other

I got stuck with the MPC framework. When two devices are connected, the connection status is shown as connected. However, the console keeps giving an error of connection fails while data of two devices is in sync . The error is [ViceroyTrace] [ICE][ERROR] Send BINDING_REQUEST failed(801A0016). Al...
lulusen
1

votes
1

answer
47

Views

Why UITableView calculate its contentSize based on its default rowheight(44) not custom rowHeight

here is the question: if you have 20 cells and set tableView.rowHeight = 60, and after tableView load its data , its contentSize is 44*20=880 not 20*60=1200 what should i do if i want the contentSize is 1200
LE24
1

votes
1

answer
184

Views

“Italic” does not work in UILabel in Xcode -iOS

I am trying to design a view as attached, however, my label text is not 'Italic' as I have already set in label attribute. Tried to find solutions, but seems like all is programmatically adjustment. Is there anything I miss out to config 'Italic' in storyboard directly?
Peter Guo
1

votes
1

answer
87

Views

Change UISlider controller when Table row clicked

I want to create a UISlider that when a user selects a tableview row. It updates the min & max value moves the slider to a value set by a variable. The slider is in a different Viewcontroller then the tableview. I am passing the values to the slider using a struct (Posted below). At this point, I ca...
k.thomas
1

votes
0

answer
110

Views

How to achieve metering with AVPlayer in ios?

AVAudioPlayer provides metering. We can enable it by setting true to the property isMeteringEnabled. And then call updateMeters method to update the values to get a particle effect music visualizer as explained in th link given below: https://www.raywenderlich.com/36475/how-to-make-a-music-visualize...
Rahul Gupta
1

votes
0

answer
59

Views

How do I shut off scrolling on the Instagram in-app browser?

I've created a web game, and for some reason Instagram Stories swipe ups adds padding to the bottom of the game. It operates fine in Chrome, Safari, and Firefox (both mobile and desktop), and fine on Android's Instagram in-app browser - just not iOS. How do I force no scroll on the site? I have tri...
piedpipermask

View additional questions