我使用下面的代码从代码更改键盘布局,但出现在第二行的警告下方。
//warning
Assigning to 'TISInputSourceRef' (aka 'struct __TISInputSource *') from 'const void *' discards qualifiers
//code
CFArrayRef sourceList = TISCreateInputSourceList (NULL, false);
TISInputSourceRef wantedSource= CFArrayGetValueAtIndex(sourceList, 0);
TISSelectInputSource(wantedSource);