Element annotations and comments in mobile app

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Element annotations and comments in mobile app
Medium
~3-5 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1052
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Implementing Comments on Elements (Annotations) in Mobile Apps

Annotations in mobile — not just chat over content. This is binding text or voice comment to specific point on image, document, drawing, or list element. Task technically more interesting than it seems.

Comment Attachment to Coordinates

Key problem — coordinate normalization. User taps image on iPhone SE with one screen size, second user views same document on iPad Pro landscape. Pin should point to same place.

Solution: store not absolute pixels, but relative coordinates — x and y as fraction of container width and height (0.0 to 1.0). On render multiply by actual container size. On iOS this is CGPoint(x: pin.relativeX * containerWidth, y: pin.relativeY * containerHeight). On Flutter — similarly via Positioned inside Stack with calculated left and top.

For documents with zoom harder: account for contentOffset and zoomScale of UIScrollView. Save coordinate in content space, on display convert to screen space via UIScrollView.convert(_:to:).

Typical bug: pins "move" after zoom. Happens because calculation was in viewport coords, not content. After fixing to content-coords and adding scrollViewDidZoom for position update — pins align properly at any zoom.

Storage and Sync

Each pin — object with fields: id, contentId, relativeX, relativeY, authorId, createdAt, text, resolved. Last field important: ability to mark comment as solved — standard review-tool feature.

For real-time user sync use WebSocket (Socket.io or native URLSessionWebSocketTask). New pin appears immediately for all viewing same document. Optimistic update: add pin to local state immediately, send request, on error rollback.

For offline: Core Data or SQLite with pendingSync flag. On reconnect batch-sync via REST.

Pin UI Component

Pin on screen — UIView (or View in SwiftUI / widget in Flutter) with absolute positioning. Several details from practice:

Pins shouldn't protrude beyond container. At relativeX > 0.95 pin tooltip to left edge, at < 0.05 — to right. Similarly vertically. Simple logic, but without it tooltip goes offscreen.

With many pins (50+), rendering all simultaneously unwise. Use clustering: at small zoom group nearby pins into cluster with count. Expand on zoom. On iOS — MKClusterAnnotation as pattern (even if not working with maps). On Flutter — manual clustering via quadtree or flutter_map_marker_cluster library.

Comment Thread

One pin may have multiple responses — need thread. Implement via parentId: root comments have parentId: null, responses reference parent. Don't nest deeper than one level in mobile UI — inconvenient.

Thread component opens as bottom sheet (iOS: UISheetPresentationController with .medium and .large detents; Flutter: DraggableScrollableSheet). Doesn't cover entire screen, keeps pin context.

What's Involved

  • Pin component with normalized coordinates and zoom support
  • Comment addition and editing form
  • Response thread in bottom sheet
  • "Resolved" status with visual distinction
  • REST API integration + optional WebSocket sync
  • Pin clustering with large quantities
  • Support for images, PDF, arbitrary View containers

Timeline

Basic implementation (pins on image, no thread or sync): 2 days. Full version with threads, real-time sync and clustering: 4–5 days. Cost calculated individually after analyzing requirements and existing API.