Comments (19)
I'm facing this issue as well
from molh.
I am getting same issue while showing UIContxtMenu, Have a look at the attached screenshot
Please help me
from molh.
you need to refresh the view some home, can you share some code @mehroozkhan
from molh.
@MoathOthman thank you so much for the response, how can I refresh UIContextMenu. My code is :
func tableView(_ tableView: UITableView, contextMenuConfigurationForRowAt indexPath: IndexPath, point: CGPoint) ->
UIContextMenuConfiguration? {
let contact = self.fetchUserListController.object(at: indexPath)
let index = indexPath.row
let identifier = "\(index)" as NSString
let info = UIAction(
title: L10n.contactInfo,
image: UIImage(systemName: "info.circle")) { _ in
self.userProfile(indexpath: indexPath)
}
let mute = UIAction(
title: L10n.mute,
image: UIImage(systemName: "speaker.slash")) { _ in
//self.showAlert("Error", message: "Implement mute action", handler: nil)
}
let delete = UIAction(
title: L10n.delete,
image: UIImage(systemName: "trash")) { _ in
}
let audioCall = UIAction(
title: L10n.audioCall,
image: UIImage(systemName: "phone")) { _ in
self.makeAudioVideoCall(audioCall: true, indexpath: indexPath)
}
let videoCall = UIAction(
title: L10n.videoCall,
image: UIImage(systemName: "video")) { _ in
self.makeAudioVideoCall(audioCall: false, indexpath: indexPath)
}
let leaveGroup = UIAction(
title: L10n.exitGroup,
image: UIImage(systemName: "person.3")) { _ in
self.makeAudioVideoCall(audioCall: false, indexpath: indexPath)
}
var menu = UIMenu()
if contact.isGroup {
menu = UIMenu(title: "", children: [info, mute, delete, leaveGroup])
} else {
menu = UIMenu(title: "", children: [info, mute, delete, audioCall, videoCall])
}
return UIContextMenuConfiguration(
identifier: identifier,
previewProvider: nil) { _ in
return menu
}
}
@available(iOS 13.0, *)
func tableView(_ tableView: UITableView, previewForHighlightingContextMenuWithConfiguration configuration: UIContextMenuConfiguration) -> UITargetedPreview? {
return makeTargetedPreview(configuration)
}
@available(iOS 13.0, *)
func tableView(_ tableView: UITableView, previewForDismissingContextMenuWithConfiguration configuration: UIContextMenuConfiguration) -> UITargetedPreview? {
return makeTargetedPreview(configuration)
}
@available(iOS 13.0, *)
func makeTargetedPreview(_ configuration: UIContextMenuConfiguration) -> UITargetedPreview? {
guard let identifier = configuration.identifier as? String, let index = Int(identifier) else {
return nil
}
if let cell = homeTblView.cellForRow(at: IndexPath(row: index, section: 0)) as? ChatTableViewCell {
return UITargetedPreview(view: cell.contentView)
}
return nil
}
@available(iOS 13.0, *)
func tableView(_ tableView: UITableView, willDisplayContextMenu configuration: UIContextMenuConfiguration, animator: UIContextMenuInteractionAnimating?) {
}
@available(iOS 13.0, *)
func tableView(_ tableView: UITableView, willPerformPreviewActionForMenuWith configuration: UIContextMenuConfiguration, animator: UIContextMenuInteractionCommitAnimating) {
}
from molh.
@MoathOthman moreover when I view it in debug view hierarchy it looks okay,
please help me its been 2 days now, I am stuck here
from molh.
@mehroozkhan can you create a small demo. i just tried context menu but not from the table view delegate and it was fine. but your case is a bit different
from molh.
@MoathOthman you want me to create demo project or demo video ?
I used the same code in another project and that's working fine,
For English language it works fine, getting this flipped issue only for arabic (RTL)
from molh.
demo project would be great
@mehroozkhan try to reloadData on viewDidAppear ,
from molh.
@mehroozkhan did you find a way to resolve it?
from molh.
@MoathOthman Not yet,
actually, it's a big project, I don't know how to create a demo project out of it.
from molh.
@mehroozkhan have you tried
self.tableView.semanticContentAttribute = .unspecified
from molh.
@MoathOthman yes, did not work,
I can't understand why it shows correctly in debug view hierarchy
from molh.
@mehroozkhan any luck ?
from molh.
@MoathOthman Yes, I fixed it, in xcode project my development language was set to arabic,
I changed it to english, thats it.
from molh.
@mehroozkhan you mean the app language from the project scheme ?!
from molh.
@MoathOthman not app language, its development language, I don't know how it got set to arabic.
from molh.
mm, but how do u do localization?
from molh.
@MoathOthman I did not understand, No using localization in storyboard,
doing localization via code only.
from molh.
I see, good to hear to worked out for you
from molh.
Related Issues (20)
- application restart not working as well HOT 10
- Label's font doesn't change with language (Localization) HOT 1
- App Getting Crashed for iOS 13 HOT 9
- Language of UIActivityViewController Does not change when Reset HOT 16
- Kurdish language corrupted text HOT 14
- Canβt embed molh in objective c project HOT 1
- images flip even I forced it to LTR
- Not work fine with Zendesk Chat HOT 7
- reset func not work in version 1.3 HOT 6
- set Default Language to Arabic not working right on first run HOT 19
- Language not changed on camera icons and toolbar
- when change language to Urdu or Arabic and run app , texts font changed to this font HOT 1
- after update xcode and swift version HOT 16
- UIDatePicker & UISearchBar not changing language after reset HOT 3
- i have to close and open app to make view flipped case arabic language is ok but view still not flipped on first time run HOT 1
- Apple pay button text is not localised when we change the language from app but when app is restarted it works fine
- numbers language does not change after localization till restarting the app HOT 4
- App Crash Randomly HOT 3
- Regressed crash in MOLH file HOT 2
- Back button direction wrong
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from molh.