Swift3 Questions
Ad
Show a second ImageView on UIButton
I want to add an extra image on the uibutton if my condition is true. this means that if the result of my condition is: 1) "false", then
How to pass data into header while using URLSession in Swift?
I am new to swift and am in the learning phase. i have to basically make a request using urlsession but the api does not allow any
Print All Children Columns from Firebase - iOS Swift 4
I have 2 records in my users table
Why function return nil FireBase Swift
Why ever function return nil?! i try add dispathque but i don't understand how it should be right! pls help func
How could I handle dictionary in Swift 3
I am beginner, working with firebase i loaded a dictionary from firebase database which is as follow:
Swift - Sort Array with several comparison
My problem is pretty simple: i have a lot of user scores in my database (i'm using firebase by the way) i would like to get
how to get current user document in firestore swift
When user login done successfully, it takes to home screen. when user taps on user icon button will take to user account details page. here i have
Firebase Invalid registration token. Check the token format
This questions has been asked and answered many times before, yet i can't figure out what i am doing wrong. sending notifications to the whole app
Collection view not scroll smoothly when fetch data from firebase using Swift?
I am making the chat app using jsqmessage library and firebase back-end service. i got the problem when user send a lot of media messages like
Can I add long press event for alert controller
Can i add long press event for alert controller in action sheet mode. if user long pressed want show one more pop in normal alert
Ad
UITableview view reload animation issue
Please see the video for animation issue in uitableview. when i get the data from the api and refresh cell than the first cell animation issue
Json parsing Issue using objectmapper library in swift
I am facing issue with parsing response from server side. i get response in this format 1.)
Cannot convert value of type '(_) -> ()' to expected argument type '((Bool, Error?) -> Void)?'
Please, i need help with are problem, i changing the syntax swift 3 for swift 4 and now i have many problems for identification of all my bugs.the
How do i add dashed polyline in swift 4?
I already have a polyline in swift4, how can i make the style of it to dashed/dotted line ?? let path = gmsmutablepath(path:
performsegue to UINavigationController exception
My app functions correctly, but when i enable an "all exception" breakpoint it fails during this segue (gotohome). if i
SWRevealViewController with UITabBarController
App configuration this is my configuration with
Loading the results set for Core Data fetch request
I have a variable declared as such: private var thetext = string() private var aid = string() i then do a fetch
How to separate HTML string into array or dictionary by Swift3?
I got html string from api like this: let a: string = "<a href="https://www.google.com.tw">https://www.google.com.tw
Remove point from hashtag Regex
I'm using kilabel for my swift project, in order to transform hashtags to links. my problem is that the regex function that i did is capturing
How to draw a text using CoreGrahpics & Core animation
I want to achieve this type of animation.please check this url
Ad
How to show a specific VC , more like navigate to a stack of VC
So i've implemented universal link in my app and when pressing on a button i open my second app with :
Extract vaues from an array in swift
I'm getting values of string in my response to whom i'm storing in an array. its is storing properly.now i want to get that values out of my array
How can i control my headset for my music player?
I am creating an music player ios app and getting data from firebase. i can able to control play, pause, next and previous in simulator or iphone.
Swift framework creation and usage
Using xcode 9.1 i am trying to create to start level simple framework in swift and use the same in objective c or swift proj. but i am getting a
Swift: word wrapping not working? Even when set
Ok, this is only happening with one part of my text, with 1 set of labels - i explicitly set, many times, my custom uilabel's line break style to
REST API's issue
I am working on rest api's in ios application. i have tested server url and parameters
Custom Layout UICollectionView
How do i set a horizontal orientation to a collection view in swift? i need want the row layout to be like the picture below.
Binary operator error on condition
I want to give condition on pickerview row, but it just giving me error. binary operator cannot be applied to operands.
UITableView Scrolls To Undesired Index or Position
Basically the task is to load new api response as the user scrolls to down in uitableview without stopping user interaction and
Change the normal search bar to below image like search bar
Here i just placed one search bar controller which default design in xcode. can any will help me to make search bar likes the second one?
Date from String not Set in UIDatePicker Swift 3
I want to set the datepicker date from string.i have a multiple date in view and i am using date picker via iboutlet for different string date
Ad
How to make table view to display like flip animation in all devices in swift 3?
In all devices the table view needs to be display only 70% of the screen irrespective of all devices and it should need to display only from
Issue when filtering with UISearchResults
So i have a list of friends coming from the api and i've tried to implement also the search functionality. so far, so good, the filtering is good,
Show a view on every view controller
I have to show a view on the current view controller that is being displayed on recieving a push notification. i want that i make one view that
iOS : Unbox JSON with array of dictionary array
I want to parse a json file using unbox library. the json is an array of dictionary array. how can we do that? i tried using keypath and all but
Swift 4 Conversion error - Type 'NSAttributedStringKey' has no member 'foregroundColorNSAttributedStringKey'
I converted my code from swift 3 to swift 4 but getting this error: type 'nsattributedstringkey' has no member
How to get the actual measurement value from measurement chracteristic UUID: 2A9D of AND BLE WS in an iOS app using SWIFT 3?
I am trying to synchronize the actual measurement value from measurement characteristic uuid of and ble weight scale model no:
How to Pass values in between segues
So i have 2 view controllers that i want to pass values in between and have the following code @ibaction func analysisbutton(_
Waze doesn't load navigation from Swift
I integrated waze into my swift app, but when i click on the button, waze opens but nothing happens with the navigation. i juste see the app and
Ad
Using PHP to send iOS Push Notifications via APNs
I have implemented push-notifications into my project and everything works fine so far. i've tried sending notifications through pusher and this
How to set spacing between columns in a UICollectionView with a vertical scrolling grid
I'm kinda new to uicollectionviewflowlayout sophisticated topics, and yes!! i have checked all topic-related questions but still i'm
iOS view visibility gone
I am new to ios development.i want to toggle (hide/visible) a subview from parent view.in android there is a way to hide the visibility to
How to fix why status bar space behind ScrollView in Xcode?
I added a scroll view to my view which is hover the status bar (i hid it). the scroll view is working fine, but when i'm scrolling to the top, i
ScrollView doesn't work properly in Xcode
I would display a view in my ios app, but when i try to use scrollview, even if i put stack views, it doesn't work. here is a screenshot
Swift 3 - Update key:value in dictionary in an array of dictionaries after comparison. Please assist
I have an array of dictionaries that i get as a json response to a url jsonresponse1 = [{"id":"100", "name":"matt",
Resizing UILabel with HTML data
I created a uilabel and synced its font size with a seekbar and loaded my html formatted text onto the uilabel. unfortunately, the format gets
ImageCache swift 3
Hi i want to cache my images coming from json. i have made a networkservice which downloads and parse the json and i use the func downloadimage()
iOS - Is possible to combine Swift 3 and Swift 4 code within one project?
I have a project (xcode 9) that uses a lots of 3rd party libraries. some of them are written in swift 3 (only) and some other in swift 4
How to handle local notification if the app is cleared from background
I just created an application to notify the task in a specific time.and it's working perfectly on time. if i click on the notification bar it
Ad
Swift 3 - Compare two unequal length arrays and append placeholder values in it to make them equal
My first array is arr1 = [1, 2, 3, 4 , 5] my second array is arr2 = [2, 3, 4]
Return more concrete objects from Data Model in Swift
I am working on an app which fetches data from firebase. the code i am going to show you works just fine but even as a rookie i know that
Error while creating extension Swift 4 : Use of undeclared type 'UIFont'
I am creating extension of uifont, it gives an error. i am attaching a screenshot of it. this error goes away when import
Deallocate view controllers in navigation controller that have a reference to self
Say i have view controllers a, b, c, d & e all embedded in a navigation controller. in view controller b, i have a custom uiimageview object.
Just in time schema in Cloudkit
I want to use private database of cloudkit for my app, so for designing i was looking for something which would easily map my model classes to
EXC_BAD_ACCESS KERN_INVALID_ADDRESS in Swift and iPhone 5
I just launched the app and i have an issue with iphone 5 and 5c and ios 10.3.3 (only).
How to identify the segue identifier on destination view controller?
I have two view controllers, the first one has two buttons, signup and login, the second vc does the function of signup and login stuff (i wrote
How to save a default printer in UserDefaults in Swift?
This is the workflow of my app: user can select a default printer from app's settings page and will use this default printer to print
Insert row tableview with a button at last section
I want to make a tableview with a button in the section. i want the button to add one more row to a tableview like this
Error while trying to convert the Array to Int
So i've taken my bundle version and save it in an array but it s of type string. i ve tried and .map it to be int but i receive cannot
Attempt to present....whose view is not in the window hierarchy
I have been battling to get this to work. i have written a function to try and check if the user is logged in or not and if they are not they will
Ad
Show a button on another controller
I have two controller, one controller is controllerone.swift, in this i receive notifications and i need when one notification arrive, show a
Relationship fault in Coredata
I know that there is much question about this problem on so, but none of them was helpful for me. i want to set array of students to each
Index out of range data nil swift 3
I have data coming from json and populating it inside an uiimage using alamofireimage. one of those elements that i am getting back from json is a
Convert Timestamp to Date with various formats Swift
Code:- let addedtime = dictmessage?.object(forkey: "added_time") as? string let timeinterval : timeinterval = (addedtime as
Swift: Load Photos images into app
I have an app which shows a screensaver when it detects that there is no user action. currently, it is working as the images for the screensaver
I need to give space between one cell and another
I not find what is my problem. i need to give space between one cell and another. i wrote self.tableview storyline.delegate = self because
Cannot force unwrap value of non-optional type 'AnyObject'
I've converted my ios project from swift 2.x to swift 3.x there are now more then 50 errors in my code. one of the most common is this one "cannot
viewForHeaderInSection alignment wrong (Swift 3)
I have no idea where i'm wrong. the text is always aligned from the left . func tableview(_ tableview: uitableview,
What is causing this crash in NSUserDefaults?
We see a sporadic crash in our user base, during a routine read from nsuserdefaults. the overwhelming majority of users don't
CollectionView. Maximum distance between Item. Swift 3
I know there is only minimum spacing between items and you can achieve that via size inspector or func collectionview(_
Align Buttons from different cells in Swift 3
I have two buttons which are on different cells from the table and i want them aligned . the first cell is consisted from 3 buttons and i
Ad
For in loop. How does it works?
i need an explanation about for in loops in swift. let's consider the following example. public struct person { let
Convert swift3 list to json
I'm looking for a way to convert swift3 list var mylist = [myobject](); to json. i used:
How to resolve : Unable to simultaneously satisfy constraints
I want to create like this ( done through storyboard )
How to build a Table View with specific number of rows?
I have been reading similar questions and until now neither has solved this error or i have not found it. i have a tableview and i need
RNCryptor is not decrypting in iOS
I am using rncryptor in my application. i generated an encrypted string for a plain text using a password and when i try to
UICollectionViewController Calling DataSource method of another UICollectionViewController
I have implemented custom uitabbarcontroller first and second uitabbaritem is a
Escaping closure swift3
I am having an issue regarding closure escaping.the closure is defined as escaping but somehow the compiler always gives an error. the
How to get index of selected tab in UITABBAR
How to get selected index of uitabbar item in swift i am not talking about uitabbarcontroller. i know i can get using
How to use autocompleteBounds in swift 3
I want to use autocompleteviewcontroller in a special area with this lat and long let southwest_latitude = 35.60; let
How to fix C-style for statement has been removed in Swift 3?
I am converting old swift 2 code to swift 3 and i am facing difficulty in converting following for loop for (var nsize =
How can I set size leftBarButtonItem?
I am trying set size programmatically of left button bar item but i can't it. this is my code: let backbutton =
Ad
Error on iterating over array swift
I'm trying to loop through array and get the coordinates but it's giving me an error and i can't access my array. the data is passed through a
How to store drop pin destination coordinates swift
I'm trying to store the drop pin destination coordinates and pass them back through the delegate? i have the below drop pin function.
How to retrive data through database observer in Swift4 with couchbase?
I am new to couchbase as well as nosql. i can upload data on couchbase db and retrieve them through enumerator and show them in a table view. but
dateFromString() returning wrong date swift 3.0
I am passing "01/12/2017" in the fromdate.text(textfield), but receiving unexpected output. let formatter =
Animation within headerView in Swift
I'm currently trying to add an animation to the user's xp bar. if i had the animation in the collectionviewcontroller, the animation is
'[NSObject]' is not convertible to '[AnyObject]'
I'm trying to create tableview where the arrays are being sorted and put in there respective sections. i followed this tutorial:
How to show push notification while app is in running state in Swift 4?
Though till swift 3 we used didreceiveremotenotification userinfo: [anyhashable : any] method its working fine, but in swift 4 its
How to connect items to category in one to many relationship when insert data
I have 2 entities one customers and other is cases, the relationship is one to many one customer had many cases and the relation names tocustomers
Ad
Blog Categories
Ad