Вы можете использовать этот фрагмент, чтобы получить вибрацию.
UIView.animate(withDuration: 3.0, delay: 0.0,
usingSpringWithDamping: 0.1,
initialSpringVelocity: 0.9,
options: [.curveEaseIn, .overrideInheritedCurve], animations: {
let rangeOfTag = (self.detailText.text as NSString)
.range(of: "satisfactorily")
let glyRange = self.detailText.layoutManager.glyphRange(forCharacterRange: rangeOfTag, actualCharacterRange: nil)
let rect = self.detailText.layoutManager.lineFragmentRect(forGlyphAt: NSMaxRange(glyRange), effectiveRange: nil)
self.detailText.scrollRectToVisible(rect, animated: false)
}, completion: nil)
Я думаю, что лучший подход должен был бы осуществить рефакторинг приложение для использования всего одной строки подключения вместо того, чтобы пробовать к ссылочной от другого в конфигурационном файле.
I know this post is a bit old, but I figure this will help someone out there:
You can use the EntityConnectionStringBuilder to build your EF connection from your existing connection string. This is a sample I'm using in my own code:
public static string GetEntityFrameworkConnectionString(string clientConnectionString)
{
EntityConnectionStringBuilder entityBuilder = new EntityConnectionStringBuilder();
entityBuilder.Provider = "System.Data.SqlClient";
entityBuilder.ProviderConnectionString = clientConnectionString;
entityBuilder.Metadata = "res://*/Entities.UBTEntities.csdl|res://*/Entities.UBTEntities.ssdl|res://*/Entities.UBTEntities.msl";
return entityBuilder.ToString();
}
So when you instantiate your EF provider, just pass in the string returned from the method above into the constructor.
Hope this helps.