Posts

Post not yet marked as solved
67 Views

Wind Down

How to show app accroding activity like sleepmindfulness ? I used this code but my didn't show in wind down that category let playSoundIntent = INPlayMediaIntent.init(mediaItems: nil, mediaContainer: mediaItem, playShuffled: false,playbackRepeatMode: .none,resumePlayback: false) if #available(iOS 14.0, *) {             playSoundIntent.shortcutAvailability = .sleepMindfulness         } else {                     }         playSoundIntent.suggestedInvocationPhrase = "Play Calm Exercise" if let shortcut = INShortcut(intent: playSoundIntent){          INVoiceShortcutCenter.shared.setShortcutSuggestions([shortcut])         }
Asked Last updated
.
Post not yet marked as solved
312 Views

How to set lineBreakMode to WKInterfaceLabel?

Hello Guys,I want to set multi line text in my watch app using WKInterfaceLabel but i don't want to cut down my word so i want to give it a lineBreakMode to wordWrap but WKInterfaceLabel doesn't have that kind of property.Even i did try it with NSAttributedText as well but didn't work.Here is my code that i tried : let font = UIFont.systemFont(ofSize: 15); let style = NSMutableParagraphStyle(); style.lineBreakMode = .byWordWrapping; let attributes: [NSAttributedString.Key: Any] = [ .font: font, .paragraphStyle: style, ]; let attributedString = NSAttributedString(string: getPromptText(), attributes: attributes) lblDisplayText.setAttributedText(attributedString);
Asked Last updated
.