NSString *copyStringverse = [[NSString alloc] initWithFormat:@"%@",[textview.text]];
UIPasteboard *pb = [UIPasteboard generalPasteboard];
[pb setString:copyStringverse];
Run Code Online (Sandbox Code Playgroud)
我使用上面的代码复制内容 textview
,但我想复制表格的单元格中的内容.这该怎么做.提前致谢.
我有一些文本共享到evernote的问题,共享evernote是成功的,但这是我目前的代码情况.我有一个UITableView
相应文本的文本和标题.单击共享按钮时,它将一个人共享文本到evernote网站,但标题仍然是静态的.在那里,我得到了第一个标题名称以及不同的文本.我的代码在我的tableview中rowAtIndexPath
NSMutableString *strr=[[NSMutableString alloc]initWithString:[appDelegate.indexArray objectAtIndex:indexPath.section]];
cell.textLabel.text =strr ;
cell.textLabel.text = [appDelegate.indexArray objectAtIndex:row];
cell.textLabel.font = [UIFont fontWithName:@"Georgia" size:14.0];
cell.textLabel.textColor = [UIColor brownColor];
[appDelegate.notesArray objectAtIndex:row]];
//cell.detailTextLabel.text =notes;
cell.detailTextLabel.font = [UIFont fontWithName:@"Georgia" size:14.0];
cell.detailTextLabel.textColor = [UIColor darkGrayColor];
cell.detailTextLabel.text = [appDelegate.notesArray objectAtIndex:row];
Run Code Online (Sandbox Code Playgroud)
appDelegate.indexArray
是每个单元格的标题内容,并appDelegate.notesArray
具有相应标题的文本.
在shareButton中单击:
NSMutableString *str = [[NSMutableString alloc] initWithString:@"NOTES:"];
for (int i = 0; i<[appDelegate.notesArray count]; i++) {
NSString * aString = [[NSString alloc] initWithString:[appDelegate.notesArray objectAtIndex:i]] ;
NSString * ENML= [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE en-note SYSTEM \"http://xml.evernote.com/pub/enml2.dtd\">\n<en-note>%@",aString]; …
Run Code Online (Sandbox Code Playgroud) 我在我的iPhone应用程序中看到状态栏上有一个可以访问通知中心的手势.如何在我的应用程序中实现这种转换?我认为这是通过滑动手势识别器完成的,但如何从上到下包含滑动手势(如何将Notification Center拖动到完全过渡)?是否有任何示例代码或某些东西可以帮助我这样做?提前做出来的
如何更改文本提交的占位符字体?这是否可以更改文本提交的占位符的默认字体?如果有人知道,请帮助我.谢谢.
我在按钮单击[NSThread detachNewThreadSelector: @selector(spinBegininapp) toTarget:self withObject:nil];
中显示此代码以显示后台线程正在运行的用户的活动指示器,我将此代码用于启用活动指示器
- (void)spinBegininapp
{
_activityindictor.hidden = NO;
}
Run Code Online (Sandbox Code Playgroud)
它工作正常,当我点击它显示活动指示器动画的按钮,当线程它隐藏活动指示器,但我需要显示progressView而不是活动指示器,它根据线程进展,如果线程完成,它需要完全达到进度并自我隐藏.这是可能的.
我在App商店有一个应用程序,我需要为ios6和iphone5更新该应用程序.当已经提交到App商店时,更新exsting应用程序需要采取哪些步骤?
我在mac中安装了xcode4.5.如果我在iOS 6中构建应用程序,它是否会在iOS 5中得到支持?我应该如何制作支持iOS 5和iOS 6的应用程序?
编辑
public static bool IsTall
{
get {
return UIDevice.CurrentDevice.UserInterfaceIdiom
== UIUserInterfaceIdiom.Phone
&& UIScreen.MainScreen.Bounds.Height
* UIScreen.MainScreen.Scale >= 1136;
}
}
static UIImage tableViewBackgroundImage = null;
public static UIImage TableViewBackgroundImage
{
get
{
if (tableViewBackgroundImage == null)
tableViewBackgroundImage = IsTall
? UIImage.FromFile("Images/TableViewBackground-568h@2x.png")
: UIImage.FromFile("Images/TableViewBackground.png");
return tableViewBackgroundImage;
}
}
Run Code Online (Sandbox Code Playgroud)
我使用上面的代码来制作iphone 5的应用程序.但我知道在哪里放上面的代码.任何人都使用这个代码,请与我分享.
提前致谢.
我正在做一个包含用户登录的应用程序,只有用户登录,然后才会重定向到主页面.但是我想做一次登录,如facebook登录或ebay登录,如果用户唱歌,用户名需要维护,不需要进一步登录,但如果应用程序从iphone删除然后它ok.now我的应用程序需要登录从iphone记忆中删除应用程序(多任务处理).如何为我的应用程序设置一次登录?关心尼平
我点击了一下按钮就可以使用此代码
-(IBAction)_clickbtnratethisApp:(id)sender
{
NSString *str = @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa";
str = [NSString stringWithFormat:@"%@/wa/viewContentsUserReviews?", str];
str = [NSString stringWithFormat:@"%@type=Purple+Software&id=", str];
// Here is the app id from itunesconnect
str = [NSString stringWithFormat:@"%@289382458", str];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
}
Run Code Online (Sandbox Code Playgroud)
但是当我点击按钮时没有任何反应,我需要的是我想要设置一个警报视图,像普通的警报一样显示像ratethisapp,nothanks,稍后.如果我点击ratethisapp,我将重定向到appstore的响铃页面.如何激活这个?先谢谢.
我有一个名为delegate.allSelectedVerseEnglish的NSMutableArray来自应用程序委托,它有一些值,我能够获得数组计数,我可以在UITableView中正确显示它.但现在我想在textview中显示它.我的UITableView代码是这样的
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [delegate.allSelectedVerseEnglish count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
readCell *cell = (readCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"readCell" owner:self options:nil];
cell = [nib objectAtIndex:0];
cell.label.text = [NSString stringWithFormat:@"%d",indexPath.row+1];
cell.textLabel.text = [NSString stringWithFormat:@" %@",[delegate.allSelectedVerseEnglish objectAtIndex:indexPath.row]];
cell.textLabel.font …
Run Code Online (Sandbox Code Playgroud) 我UIButton
在设置页面中有两个,一个按钮用于增加文本的字体大小,另一个按钮用于减小文本的字体大小.但我需要的是当用户点击UIButton
增加字体大小时,它需要切换18pt,然后用户再次点击或再次点击它需要将字体大小设置为24pt的同一按钮,然后再次点击相同的按钮导致字体大小为32pt的水泥.我需要限制或点击计数.反之亦然,减少字体大小按钮的效果相同.
-(IBAction)_clickfontsizeincrease:(id)sender
{
self.multiPageView.font = [UIFont systemFontOfSize:30.0f];
}
-(IBAction)_clickfontsizedecrease:(id)sender
{
self.multiPageView.font = [UIFont systemFontOfSize:10.0f];
}
Run Code Online (Sandbox Code Playgroud)
这该怎么做?提前致谢.
iphone ×10
ios ×5
button ×1
cocoa-touch ×1
ios5 ×1
ios6 ×1
ipad ×1
iphone-5 ×1
nsarray ×1
nsstring ×1
objective-c ×1
rate ×1
uibutton ×1
uipasteboard ×1
uitouch ×1