У меня возникли проблемы с (ярлыке), когда фраза, как «Я 20 лет» усекается до «Я ...» и оставшееся предложение делает не появляется. Подобно тому, что появляется на линии ниже оставшегося предложения или чего-то еще.Apple, смотреть текст на этикетке
import WatchKit
import Foundation
import WatchConnectivity
class InterfaceController: WKInterfaceController,WCSessionDelegate {
@IBOutlet var Notification: WKInterfaceLabel!
var watchNotification = "ok"
let session = WCSession.defaultSession()
//@IBOutlet var lblNotification: WKInterfaceLabel!
override func awakeWithContext(context: AnyObject?) {
super.awakeWithContext(context)
// Configure interface objects here.
}
override func willActivate() {
// This method is called when watch view controller is about to be visible to user
initSession()
super.willActivate()
}
func session(session: WCSession, didReceiveMessage message: [String : AnyObject])
{
let msg = message["NotificationSentforIphone"] as! String
Notification.setText("notificat :\(msg)")
//lblNotification.setText("Notification:\(msg)")
}
@IBAction func ActionSentNotificationforIphone()
{
let msg = ["NotificationSentforWatch" : watchNotification]
session.sendMessage(msg, replyHandler: {(replay) -> Void in }) { (error) -> Void in
}
}
override func didDeactivate() {
// This method is called when watch view controller is no longer visible
super.didDeactivate()
}
func initSession()
{
session.delegate=self
session.activateSession()
}
}
Можете ли вы оставить свой код? – Brick