Post

Replies

Boosts

Views

Activity

Reply to AppKit.NSOutlineView: How to get width of indentation marker(disclosure triangle) area
I need to know row view width in column I'm not totally sure, but this func should directly return the frame without the disclosure button: func frameOfOutlineCell(atRow row: Int) - NSRect Is it what you are looking for ? If you want the size of disclosure area, you could : loop through all subviews of the NSOutlineView, searching for buttons. Disclosure buttons should be there. Have a look at this post, which could help find the solution: https ://www.reddit. com/r/swift/comments/e2xi4n/position_of_a_disclosure_button_inside/
Topic: UI Frameworks SubTopic: AppKit Tags:
Mar ’21
Reply to How to can we add expand and collapse cell at the bottom of tableview in swift
You asked 2 hours ago and request again 15' later ! Come on, no one is there just to rush on your questions. 😉 And you'd better clarify your problem. two cells are expandable and others are not. So, you have cells A, B which are expandendable And cells D, E, F below are not. Correct ?  I need when i click on expandable cell it should show cells under it and on clicking again it should hide What is it you don't know how to do ? What is the problem exactly ? To hide, you should set hidden to true for cells C, D, E and set their height to zero. See this: https://stackoverflow.com/questions/29886642/hide-uitableview-cell
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to Delete record without navigate another controller
but in delete operation we have no need to navigate another controller just click on button action will be performed Where do you navigate to ? Is it UpdateViewController ? Which button do you tap ? Note: When you format code, take care to format in a single chunk. It is easier to read: func deleteData(id:String){ let fetchRequest = NSFetchRequestNSManagedObject(entityName: "User") fetchRequest.predicate = NSPredicate(format: "id = '\(id)'") do { let test = try context.fetch(fetchRequest) let objectToDelete = test[0] context.delete(objectToDelete) do { try context.save() } catch(let error) { print(error.localizedDescription) } } catch(let error) { print(error) } } class SecondViewController: UIViewController,UITableViewDelegate,UITableViewDataSource { var array = [DictionaryString,String]() @IBOutlet weak var tableview: UITableView! var id = "" var obj = DictionaryString,String() override func viewDidLoad() { super.viewDidLoad() self.tableview.delegate = self self.tableview.dataSource = self array = DataHandler.sharedInstance.fetch() } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) - Int { return array.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) - UITableViewCell { let obj = array[indexPath.row] let cell = tableView.dequeueReusableCell(withIdentifier: "cell") as! TableViewCell cell.usernameLabel.text = obj["username"] cell.emailLabel.text = obj["email"] cell.passwordLabel.text = obj["password"] cell.updateBtn.addTarget(self, action: #selector(didTapUpdateBtn(sender:)), for: .touchUpInside) cell.updateBtn.tag = indexPath.row return cell } @objc func didTapUpdateBtn(sender:UIButton) { let obj = array[sender.tag] let sb = UIStoryboard.init(name: "Main", bundle: nil) let vc = sb.instantiateViewController(identifier: "update") as! UpdateViewController vc.obj = obj self.present(vc, animated: true, completion: nil) }
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to How to use combo box cell in a tableView
Here is a solution, if the cell content for column is defined as ComboBox in IB. In IB, declare that comboBox uses dataSource (in Attributes inspector). Always in IB, set the ViewController as the comboBox data Source If you want the cell to show some initial content, add the func :     func tableView(_ tableView: NSTableView, objectValueFor tableColumn: NSTableColumn?, row: Int) - Any? {         return states[row]     }
Topic: UI Frameworks SubTopic: AppKit Tags:
Mar ’21
Reply to Swift UI
What is the difference between Swift vs Swift Ui??  They are totally different kinds of objects. Swift is a language (as Objective C) SwiftUI is a framework for building UI, just as UIKit. The name comes from the fact that it is a UI framework to use in Swift. A bit misleading. What is the difference between building app with Xcode vs without code?? You need Xcode to build apps.. Your question is not clear. What do you mean "without code" ? Do you mean ? What is the difference between building app with Interface Builder vs without ??
Mar ’21
Reply to Same apps on the App Store: One with IAP, the other paid?
I have an example of app on the appstore that exists in 2 versions, normal and Pro, at different price. After rejection (considered as spam), I had to explain in detail how the versions where different, with different functionalities, even though the core of apps was common In your case, the single app could be limited in number of registered accounts or individual preferences, unlimited in the other. You should consider as well additional features. In addition, in the app information, you should make it clear that 2 versions exist. adding special features in the future, but for now it is exactly the same. That's risky. My advice (but that does not guarantee it will be OK!, just a personal opinion) would be to add a few new features immediately, and make things very clear for reviewer when you submit any of the apps or their updates.
Mar ’21