
我需要dropdown在Xcode中实现这个概念.
为此,我正在使用UIPickerview.
当点击文本字段(在textFieldDidBeginEditing :)上时,会加载此pickerView.
题:
有没有办法,我可以添加图像TextField?
图像就像一个箭头标记,用户可以通过它来理解点击时dropdown出现的内容.textfield我该如何制作?
我必须在uiview的右边和底部放一个阴影.我在界面构建器中执行此操作.但是我看到阴影掉到了顶部.已经有不同的大小.但是无法得到它.
layer.masksToBound=No
layer.shadowOpacity=0.15
layer.shadowRadius=2
layer.shadowOffSet={10,-10} //Values being set in Interfacebuilder.
Run Code Online (Sandbox Code Playgroud)
仍然会在顶部留下阴影.我应该怎么做才能到达底部.
我需要在viewDidLoad上始终显示滚动条,以便用户可以理解有滚动的内容.我做了以下事情:
[myscrollView flashScrollIndicators];
Run Code Online (Sandbox Code Playgroud)
但是滚动条只会在viewDidLoad之后显示一段时间并再次消失,只是在用户触摸屏幕时重新出现.
我需要让滚动条始终可见.我该怎么做?
我有一个UIDatePicker,我从格式中获取所选日期.现在yyyy-MM-dd我想将其转换为MM/dd/yyyy格式..我怎么能这样做?
NSDateFormatter *df=[[[NSDateFormatter alloc]init] autorelease];
df.dateFormat = @"yyyy-MM-dd";
NSArray *temp=[[NSString stringWithFormat:@"%@",[df stringFromDate:DatePicker.date]] componentsSeparatedByString:@""];
[dateString2 release];
dateString2=nil;
dateString2= [[NSString alloc]initWithString:[temp objectAtIndex:0]];
NSLog(@"%@",dateString2);
Run Code Online (Sandbox Code Playgroud)
我得到2012-10-30,但我想要10/30/2012.
我曾经在Xcode 5.1.1中直接表示崩溃报告,因为Organizer的Devices部分中有"Symbolicate&Re-symbolicate".但升级到Xcode 6.1后,我既没有找到symbolicate也没有resymbolicate选项来查看崩溃日志.我糊涂了.怎么做?
以前我曾经将设备与iTunes同步并查看崩溃~/Library/Logs/CrashReporter/MobileDevice.单击任何崩溃将打开设备(Xcode),然后符号化.但现在,它打开了Console,没有符号选项.Xcode 6.1有这样的选择吗?
当我归档应用程序时,我得到了我项目中所有图像的CopyPNGerror.我尝试了删除所有图像,再次添加它们,检查构建阶段(复制捆绑资源).没有找到重复项.我无法理解如何进一步做什么提交应用程序.当我将具有相同图像存档的另一个应用程序存档成功时
CopyPNGFile "/Users/admin/Library/Developer/Xcode/DerivedData/App1-auevnkwujohdqtflzyputmxbvrmt/Build/Intermediates/ArchiveIntermediates/App/InstallationBuildProductsLocation/Applications/App1.app/about2 copy.png" "Classes/../about2 copy.png"
cd "/Users/admin/Documents/App/App (1)"
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypng -compress "" "/Users/admin/Documents/App/App (1)/Classes/../about2 copy.png" "/Users/admin/Library/Developer/Xcode/DerivedData/App1-auevnkwujohdqtflzyputmxbvrmt/Build/Intermediates/ArchiveIntermediates/App/InstallationBuildProductsLocation/Applications/App1.app/about2 copy.png"
Could not open output file /Users/admin/Library/Developer/Xcode/DerivedData/App1-auevnkwujohdqtflzyputmxbvrmt/Build/Intermediates/ArchiveIntermediates/App/InstallationBuildProductsLocation/Applications/App1.app/about2 copy.pngCommand /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypng failed with exit code 1
Run Code Online (Sandbox Code Playgroud)
我该怎么做才能解决这个错误?
我想将当前日期与另一个日期进行比较,如果日期早于当前日期,那么我应该停止下一个操作.我怎样才能做到这一点?
我今天有yyyy-MM-dd格式的日期.我需要检查这个条件
if([displaydate text]<currentdate)
{
//stop next action
}
Run Code Online (Sandbox Code Playgroud)
如果displaydate小于今天的日期,则必须输入该条件.
在Cocoa-Touch中我们找到了一个控件UISearchBar.我需要自定义它,以便在文本字段中显示的搜索图标(我们单击执行相应的操作)是右对齐的.通常我们发现它保持对齐.有可能这样做吗?我做过R&D但找不到......
我该怎么做?有什么好的教程我们可以找到吗?
我有一个像这样的NSMutableArray:
(
{
City = "Orlando";
Name = "Shoreline Dental";
State = Florida;
},
{
City = "Alabaster ";
Name = Oxford Multispeciality;
State = Alabama;
},
{
City = Dallas;
Name = "Williams Spa";
State = Texas;
},
{
City = "Orlando ";
Name = "Roast Street";
State = Florida;
}
)
Run Code Online (Sandbox Code Playgroud)
现在,我如何对这个NSMutableArray进行排序,以获得与我希望获得的状态"佛罗里达"相对应的结果
(
{
City = "Orlando";
Name = "Shoreline Dental";
State = Florida;
},
{
City = "Orlando ";
Name = "Roast Street";
State = Florida;
} …Run Code Online (Sandbox Code Playgroud) 我想让UITextField只接受字符并在输入数字或特殊字符时显示错误.但是当我这样做时,当我输入字母时也会显示错误.不明白我哪里出错了?
NSString *FNameReg=@"[A-Za-z]";
NSPredicate *FNametest=[NSPredicate predicateWithFormat:@"SELF MATCHES %@",FNameReg];
if(![FNametest evaluateWithObject:txtfirstname.text])
{
lblvalidateFName.hidden=NO;
[testScroll setContentOffset:CGPointMake( 0 , 74)];
return;
}
Run Code Online (Sandbox Code Playgroud)
现在,当我给出字母表时,也会显示错误.Y是这样的吗?
ios ×8
iphone ×8
xcode4.5 ×3
cocoa-touch ×2
nsdate ×2
uikit ×2
uitextfield ×2
xcode ×2
calayer ×1
objective-c ×1
shadow ×1
uidatepicker ×1
uipickerview ×1
uiscrollview ×1
uisearchbar ×1
xcode6 ×1