小编SAR*_*ASI的帖子

用于YouTube集成的Cocoapods安装

我需要为youtube集成安装cocoapods,我使用此链接http://www.raywenderlich.com/64546/introduction-to-cocoapods-2作为参考

这是我的podfile

               //////////////////////////////////////////
# Uncomment this line to define a global platform for your project
# platform :ios, '7.0'

target 'testyoutube' do

pod "YouTube-Player-iOS-Helper", "~> 0.1"

end

target 'testyoutubeTests' do

end

                //////////////////////////////////////////
Run Code Online (Sandbox Code Playgroud)

当我试图安装pod时,我收到此错误代码

Ansals-Mac-mini:testyoutube ansalantony$ pod install
Analyzing dependencies

CocoaPods 0.37.0.rc.1 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.

For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.

[!] Unable to find a …
Run Code Online (Sandbox Code Playgroud)

xcode cocoa-touch objective-c ios cocoapods

19
推荐指数
3
解决办法
4948
查看次数

如何在iOS 7中实现搜索栏.搜索工作正常,但加载的结果内容与搜索结果不对应

如何选择表视图的搜索结果而不是加载普通的表视图内容

在我的iOS项目中使用UISearchBar.搜索对我来说很好,但在选择搜索结果行的时候,选择行方法加载原始项而不是搜索结果行.我应该使用什么方法来加载结果行及其相应的详细信息页面.

谢谢,

码:

- (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString {    // Tells the table data source to reload when text changes
     [self filterContentForSearchText:searchString scope:
     [[self.searchDisplayController.searchBar scopeButtonTitles] objectAtIndex:      
     [self.searchDisplayController.searchBar selectedScopeButtonIndex]]];    

     // Return YES to cause the search result table view to be reloaded.
     return YES;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     [self performSegueWithIdentifier:@"SubCategory" sender:self];
}      

#pragma mark Content Filtering
- (void)filterContentForSearchText:(NSString*)searchText scope:(NSString*)scope {
    // Update the filtered array based on the search text and scope.
    // Remove all …
Run Code Online (Sandbox Code Playgroud)

objective-c ios

9
推荐指数
1
解决办法
895
查看次数

在Xamarin.iOS(Xamarin Monotouch)中绘制圆圈以图形方式显示进度

因为我对Xamarin World 非常陌生并且对其控件不熟悉.我想在我的单声道触摸应用程序中添加Circles to Show Work Progress.为了显示进度,我必须在圆圈中标记一个圆弧.如果可能,任何人都可以帮我一个示例代码.等待回答,非常感谢提前.我喜欢用两个文本字段init添加这样的图像

c# xamarin.ios ios xamarin

9
推荐指数
2
解决办法
7685
查看次数

如何在iOS中列出可发现的蓝牙设备和已配对的设备,在swift中使用哪种方法?

我想使用swift在我的应用程序中包含蓝牙功能.我想列出所有附近/可发现的外围设备,包括那些已经配对的设备

我应该使用哪种方法列出配对设备.我使用CoreBlutooth框架来实现蓝牙可用性检查.如果蓝牙工作正常,我想列出配对设备.如果可能,请提供直接从列出的配对设备连接设备的方法

 func startUpCentralManager() {
    println("Initializing central manager")
    centralManager = CBCentralManager(delegate: self, queue: nil)


}



func centralManagerDidUpdateState(central: CBCentralManager!) {
    println("\(__LINE__) \(__FUNCTION__)")
     println("checking state")

    if central.state != .PoweredOn {
        // In a real app, you'd deal with all the states correctly
                    return
    }
    central.scanForPeripheralsWithServices(nil,options:nil)


}
Run Code Online (Sandbox Code Playgroud)

//此方法未触发

  func centralManager(central: CBCentralManager!, didDiscoverPeripheral peripheral: CBPeripheral!, advertisementData: [NSObject : AnyObject]!, RSSI: NSNumber!) {

    var localname: NSString = advertisementData[CBAdvertisementDataLocalNameKey]! as NSString

    println("Discovered\(peripheral.name)")

    if localname != " "
    {
        centralManager!.stopScan()
        //self.peripheral = peripheral
        peripheral.delegate = …
Run Code Online (Sandbox Code Playgroud)

core-bluetooth swift xcode6 ios8

6
推荐指数
1
解决办法
6938
查看次数