Quantcast
Channel: User Burhanuddin Sunelwala - Stack Overflow
Browsing index pages (36 articles)

Image may be NSFW.
Clik here to view.

How to have an initial state with no option selected with UIButton...

I have this particular codelet genderOptions = ["Male".localized, "Female".localized] .map { UIAction(title: $0, state: .off, handler: {_ in }) }genderButton.changesSelectionAsPrimaryAction =...

View Article


First Baseline and Last Baseline Properties in UIStackView

What effect do the First Baseline and Last Baseline properties have on the subviews of a UIStackView? Generally, can someone please illustrate the implementation of these values?

View Article


Why calling super from protocol gives an error?

import UIKitpublic protocol NibInitializable { init()}extension NibInitializable where Self: UIViewController { public init() { super.init(nibName: String(describing: Self.self), bundle: Bundle(for:...

View Article

Answer by Burhanuddin Sunelwala for Modifying UISearchBar Cancel button font...

A much better solution hereUIButton *cancelButton = [searchBar valueForKey:@"_cancelButton"];[cancelButton setTitleColor:[UIColor yourColor] forState:UIControlStateNormal];[cancelButton setTitle:@"Your...

View Article

Answer by Burhanuddin Sunelwala for Swift 3: Array to Dictionary?

On Swift 4, you can achieve this by using Dictionary'sgrouping:by: initializerFor ex: You have class named Aclass A { var name: String init(name: String) { self.name = name } // . // . // . // other...

View Article


Answer by Burhanuddin Sunelwala for How to create AppStore.com short link?

Here is how you can have a short link.https://itunes.apple.com/app/id<Apple ID>Ex: https://itunes.apple.com/app/id375380948

View Article

Answer by Burhanuddin Sunelwala for Change UISearchBar cancel button text in...

Objective-C:[searchBar setValue:@"customString" forKey:@"_cancelButtonText"];Swift:searchBar.setValue("customString", forKey:"_cancelButtonText")

View Article

Add "newline" character in localizable.strings

How to add a newline character in localizable.strings?I tried putting \n, but no success.

View Article


Change Font for all UIAlertController in the app

How to change the font for all the UIAlertControllers in the app?Is there any way like how we do it for other UIElementsEx: UINavigationBar.appearance().titleTextAttributes = [.font:...

View Article


Answer by Burhanuddin Sunelwala for ios / swift - I can't append tableview cell

class CustomPortController : UITableViewController { var tableList = [CustomPortVO]() var listSeparated = CustomPortVO() func getDur1Data(){… self.tableList.append(self.listSeparated)...

View Article

Answer by Burhanuddin Sunelwala for Declaring parameters of same type in a...

Well, that is not something which is built-in in Swift.But the most near to it you can use is Tuplesfunc floatValues(values: (CGFloat, CGFloat, CGFloat)) { first = values.0 second = values.1 third =...

View Article

Answer by Burhanuddin Sunelwala for How to present a ViewController modally...

Well, I achieved it this way.Note: I am inside B.let cViewController = // getting a handle of this view controller from Storyboardlet aViewController =...

View Article

How to encrypt/decrypt a file in iOS?

I am storing a (.sqlite) in my documents folder. I need to encrypt this file, so that no one can directly access the file. Can this be achieved in iOS?

View Article


Image may be NSFW.
Clik here to view.

Standard UITableViewCell with dynamic height

I want to know is it possible to have a standard UITableViewCell with style UITableViewCellStyleSubtitle having dynamic height? If yes, then how to achieve that?I do not want to customize and make a...

View Article

Answer by Burhanuddin Sunelwala for Difference between...

These two are basically two very different methods.dequeReusableCellWithReuseIdentifier:Suppose that you have a list of articles to view. Say you have 50 articles. The screen won't show you all 50...

View Article


Answer by Burhanuddin Sunelwala for What is the most reliable and fastest...

It only depends on how you want to ADD, STORE and REMOVE this data.First Let us go through each type of Data Structure that is available to us in Objective-C:Primitive ArrayThis is the most basic type...

View Article

Answer by Burhanuddin Sunelwala for Syntax to put a variable in a string in...

let variable = 123final let urlString = "https://ozsqiqjf.preview.infomaniak.website/empdata_\(variable).json"\(variable) is what you needORuse string formattinglet variable = 123final let urlString =...

View Article


How to make google links (or any other links) to open our app?

I am developing a mapping application and I want that whenever a user clicks a google map's link or any other links (except a link from my own domain), it should show an option to open in my app as...

View Article

Answer by Burhanuddin Sunelwala for show alertController from a custom class

Well you just need to find the topmost view controller and present the alertcontroller from there.UIViewController *topController = [UIApplication sharedApplication].keyWindow.rootViewController;while...

View Article

Dictation button outside the keyboard

Is there a way to perform dictation on click of a button outside the iOS keyboard. For ex: I have a UITextField with microphone button right. On the click of this button, it should open the same...

View Article
Browsing index pages (36 articles)


Latest Images