में विशेष वर्ण कैसे सेट करें I iphone 6 और 6Plus के लिए कस्टम कीबोर्ड पर काम कर रहा हूं। मैंने शिफ्ट कुंजी सक्रिय - निष्क्रिय या 123 और एबीसी कुंजी के लिए तर्क विकसित किया है। लेकिन मैं दिखाया गया सेब कीबोर्ड जैसे कस्टम प्रतीक भी प्रदर्शित करना चाहता हूं। कृपया छवि में जांचें।आईओएस कस्टमकीबोर्ड। कस्टम कीबोर्ड
वर्तमान में मैं लोअरकेस और अपरकेस 123 करने के लिए एबीसी को बदलने में सक्षम हूँ, लेकिन मैं कैसे इस विशेष वर्ण सेट कर सकते हैं। नोट: - मैंने जिथब पर बहुत डेमो खोजा लेकिन मैं किसी भी कस्टम कीबोर्ड में विशेष चरित्र नहीं देख पा रहा हूं।
यहाँ अपरकेस और एबीसी-123 बटन के लिए मेरे तर्क है।
-(void)UpparCase:(UIButton*)sender // To make caps or small letter
{
sender.selected=!sender.selected;
if(sender.selected)
{
if(isPortrait)
{
[self.ObjKeyLayout.btnCapKey setBackgroundImage:[UIImage imageNamed:@"upparActive.png"] forState:UIControlStateNormal];
}
else
{
[self.ObjKeyLayout.btnCapKey setBackgroundImage:[UIImage imageNamed:@"Uppar_selctd_land.png"] forState:UIControlStateNormal];
}
for(UIButton *key in self.ObjKeyLayout.ArryCharKey)
{
NSString *uppercaseString = [[key currentTitle] uppercaseString];
[key setTitle:uppercaseString forState:UIControlStateNormal];
[key addTarget:self action:@selector(pressKey:) forControlEvents:UIControlEventTouchUpInside];
}
}
else
{
if(isPortrait)
{
[self.ObjKeyLayout.btnCapKey setBackgroundImage:[UIImage imageNamed:@"UpperCase.png"] forState:UIControlStateNormal];
}
else
{
[self.ObjKeyLayout.btnCapKey setBackgroundImage:[UIImage imageNamed:@"Uppar_land.png"] forState:UIControlStateNormal];
}
for(UIButton *key in self.ObjKeyLayout.ArryCharKey)
{
NSString *uppercaseString = [[key currentTitle] lowercaseString];
[key setTitle:uppercaseString forState:UIControlStateNormal];
[key addTarget:self action:@selector(pressKey:) forControlEvents:UIControlEventTouchUpInside];
}
}
}
- (IBAction)action123:(UIButton*)sender // To set 123 and ABC
{
sender.selected=!sender.selected;
if(sender.selected)
{
[self.ObjKeyLayout.btn123Key setTitle:@"ABC" forState:UIControlStateNormal];
int i=0;
for(UIButton *key in self.ObjKeyLayout.ArryCharKey)
{
[key setTitleColor:[UIColor clearColor] forState:UIControlStateNormal];
NSLog(@"\n\n123isSelected\nI-%i\tArrayCharKey.Count:-%i",i,(int)self.ObjKeyLayout.ArryCharKey.count);
if(isPortrait)
{
NSLog(@"\n\n123isSelected\nI-%i\tArrayCharKey.Count:-%i\nArraySpecialImageKey.Count-%i\n",i,(int)self.ObjKeyLayout.ArryCharKey.count,(int)arrspecialImageKey.count);
[key setBackgroundImage:[UIImage imageNamed:[arrspecialImageKey objectAtIndex:i]] forState:UIControlStateNormal];
}
else{
[key setBackgroundImage:[UIImage imageNamed:[arrSpecialIpad objectAtIndex:i]] forState:UIControlStateNormal];
}
[key setTitle:[NumKey objectAtIndex:i] forState:UIControlStateNormal];
[key addTarget:self action:@selector(pressKey:) forControlEvents:UIControlEventTouchUpInside];
i++;
}
}
else
{
[self.ObjKeyLayout.btn123Key setTitle:@"123" forState:UIControlStateNormal];
int i=0;
for(UIButton *key in self.ObjKeyLayout.ArryCharKey)
{
[key setTitleColor:[UIColor clearColor] forState:UIControlStateNormal];
if(isPortrait)
{
[key setBackgroundImage:[UIImage imageNamed:[arrKeyImages objectAtIndex:i]] forState:UIControlStateNormal];
}
else
{
[key setBackgroundImage:[UIImage imageNamed:[keyIpad objectAtIndex:i]] forState:UIControlStateNormal];
}
;
NSString *uppercaseString = [arrAlphabet objectAtIndex:i];
[key setTitle:uppercaseString forState:UIControlStateNormal];
[key addTarget:self action:@selector(pressKey:) forControlEvents:UIControlEventTouchUpInside];
i++;
// is123selected=NO;
}
}
}
हां, पूंजी अक्षरों के लिए अच्छा तर्क। –